4 Replies Latest reply on Feb 4, 2016 5:16 PM by srmudiganti

    Migrating a WS frm Jboss 4.2.2 to Jboss 7.1

    vatsanm

      Tryign to nigrate an existing WS from Jboss 4.4.2 to Jbss 7.1 Final and gettign a lot of issues.

      My code is below.

       

       

      @WebService (name="OasService", serviceName="OasServiceService", targetNamespace=http://oas.ws.etm.vzw.com/)

       

      @SOAPBinding (style=SOAPBinding.Style.DOCUMENT,

      use = SOAPBinding.Use.LITERAL,

       

      parameterStyle = SOAPBinding.ParameterStyle. )

       

       

       

       

       

       

       

       

      BARE

       

      @WebMethod(operationName = "accountInquiry")

       

       

       

      public AccountInquiryResp accountInquiry(@WebParam(name = "accountNumber")String PaccountNumber,

      @WebParam (name = "zipCode")String Pzip)

      {

      .......

      }

       

       

      When I deploy teh war file, I see the wsdl that it  auto-created.  But I get "SeVERE error - unknown tags...." when the war file finally finishes deployment.  The log file snippet is below.

      11:37:54,106 SEVERE [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-16) Schema element {http://oas.ws.etm.vzw.com/}calculateTax references undefined type calculateTaxType for service {http://oas.ws.etm.vzw.com/}OasServiceService.
      11:37:54,108 SEVERE [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-16) Schema element {http://oas.ws.etm.vzw.com/}changeCostCenterIndicator references undefined type eCareChangeCostCenterIndicatorType for service {http://oas.ws.etm.vzw.com/}OasServiceService.
      11:37:54,111 SEVERE [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-16) Schema element {http://oas.ws.etm.vzw.com/}restoreSubscriber references undefined type eCareRestoreType for service {http://oas.ws.etm.vzw.com/}OasServiceService.
      ......

      11:37:55,929 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "*service.war".

      When I run a test clietn using my own code or soapUI, it failes and I see :

      etrieving from host the oas service: http://10.170.49.176:9999/etmservice/service/oas?wsdl
      Retrieving the port from the following service: javax.xml.ws.Service@14db0e3
      Invoking the accountInquiry operation on the port.
      com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused (errno:239)
              at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:119)
              at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:128)
              at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
              at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
              at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
              at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
              at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
              at com.sun.xml.ws.client.Stub.process(Stub.java:235)
              at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
              at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
              at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
              at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
              at $Proxy27.accountInquiry(Unknown Source)
              at client.ActInqWSClient.doAccountInquiry2(Unknown Source)
              at client.ActInqWSClient.main(Unknown Source)
      Caused by: java.net.ConnectException: Connection refused (errno:239)
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
              at java.net.Socket.connect(Socket.java:539)
              at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:564)
              at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
              at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
              at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:949)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
              at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
              at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
              at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:107)
              ... 14 more

      Any suggestions or drirection is appreciated.

       

       

       

       

       

       

       

       

       

       

       

        • 1. Re: Migrating a WS frm Jboss 4.2.2 to Jboss 7.1
          vatsanm

          more to the mystery.

           

          if I change the SOAP doc type to RPC instead of DOCUMENT, then all the "SEVERE" errors go away, but they are relaceed by a new namespace error.

           

          The value of the attribute "prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid. Prefixed namespace bindings may not be empty.
          10:01:51,815 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."etmservice.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."etmservice.war".INSTALL: Failed to process phase INSTALL of deployment "etmservice.war"
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0.13]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0.13]
                  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0.13]
          Caused by: java.lang.RuntimeException: Cannot publish wsdl to: /opt/vzw/webserver/jboss-as-7.1.0.Final/server/etm-webservice/data/wsdl/etmservice.war/OasServiceService.wsdl
                  at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:107)
                  at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:222)
                  at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:93)
                  at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
                  at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:117)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
                  at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:81)
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                  ... 5 more
          Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid. Prefixed namespace bindings may not be empty.
                  at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
                  at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
                  at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.getWsdlDocument(WSDLFilePublisher.java:115)
                  at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:81)
                  ... 14 more
          Caused by: org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid. Prefixed namespace bindings may not be empty

          • 2. Re: Migrating a WS frm Jboss 4.2.2 to Jboss 7.1
            vatsanm

            I fixed the "SEVERE" error messages.  they were all caused by name conflicts in the various schemas that are in the system.  This is all stuff that I inheirted (before anyone has a comback :-)   ).  But I stil cant get to my web srvice from SoapUI.  I still get conection refused.

            And the saga continues.

            • 3. Re: Migrating a WS frm Jboss 4.2.2 to Jboss 7.1
              vatsanm

              Yeaaaahhhh.  I was able to finally fix all the issues and now teh WS is getting called though soapUI.  All of the issues was caued by xml naming conflicts usign teh same napspace.  I guess JB4.2 didnt worry too much about namespaces.

              • 4. Re: Migrating a WS frm Jboss 4.2.2 to Jboss 7.1
                srmudiganti

                Hi Vatsan,

                 

                I see it's an old post but I got the same error "The value of the attribute "prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid. Prefixed namespace bindings may not be empty." when migrating web services from Jboss 4 to Jboss 7.1.1final. Could you let me know the changes you have made to resolve the name space conflicts ? Thanks in advance