Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4895

Switchyard application with two services based on a WSDL fails to deploy using Java 8

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • SwitchYard
    • None

    Description

      We have a Switchyard application with two services based on a WSDL with two services as well.

      13:15:29,319 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."wsdl_with_two_services-1.0.0.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."wsdl_with_two_services-1.0.0.jar".SwitchYardService: org.switchyard.component.soap.WebServicePublishException: javax.wsdl.WSDLException: WSDLException: faultCode=SWITCHYARD035438: Could not find port {http://ws.contract.soa.example.com/createContract}CreateContractResponse:CreateContractRequestSOAP in the Service {http://ws.contract.soa.example.com/createContract}CreateContractResponse
      	at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:84)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
      Caused by: org.switchyard.component.soap.WebServicePublishException: javax.wsdl.WSDLException: WSDLException: faultCode=SWITCHYARD035438: Could not find port {http://ws.contract.soa.example.com/createContract}CreateContractResponse:CreateContractRequestSOAP in the Service {http://ws.contract.soa.example.com/createContract}CreateContractResponse
      	at org.switchyard.component.soap.InboundHandler.doStart(InboundHandler.java:193)
      	at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60)
      	at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:638)
      	at org.switchyard.deploy.internal.Deployment.start(Deployment.java:145)
      	at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:127)
      	at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:77)
      	... 5 more
      Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=SWITCHYARD035438: Could not find port {http://ws.contract.soa.example.com/createContract}CreateContractResponse:CreateContractRequestSOAP in the Service {http://ws.contract.soa.example.com/createContract}CreateContractResponse
      	at org.switchyard.component.soap.util.WSDLUtil.getPort(WSDLUtil.java:303)
      	at org.switchyard.component.soap.InboundHandler.doStart(InboundHandler.java:150)
      	... 10 more
      

      If you look at the names in this example message you can see that the port is built for a 'response' service while being a 'request' port.

      The reason is in WSDLUtil.getService() in line 240/241. It arbitrarily uses the first service instead of matching the service with the portName.

      Referring to WSDLUtil.getService() line 240: With Java 7, definition.getAllServices().values() returned the matching service for the portName first. With Java 8, this is not the case. Therefore, the behaviour changed without you having changed the code.

      If you run the sample application in JUnit with both Java versions, it will pass with Java 7, but will fail with Java 8.

      Attachments

        Activity

          People

            virchete_jira David virgil naranjo (Inactive)
            rhn-support-mputz Martin Weiler (Inactive)
            Stefan Veres Stefan Veres
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: