Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10625

Cannot deploy two WS with same serviceName but different endpointInterface, targetNamespace and portName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.3.0.ER1
    • EAP_EWP 5.2.0
    • Web Services
    • JBoss Enterprise Application 5.2.0

    • Hide

      Create two WS with the same serviceName but different targetNamespace, portName, endpointInterfaces.

      Deploy to EAP 5.1.2 and it will work fine.

      Deploy to EAP 5.2.0 and it will fail with the error described.

      Show
      Create two WS with the same serviceName but different targetNamespace, portName, endpointInterfaces. Deploy to EAP 5.1.2 and it will work fine. Deploy to EAP 5.2.0 and it will fail with the error described.
    • Hide
      <para>If two web services were defined with the same <code>serviceName</code> but different <code>endpointInterface</code>, <code>targetNamespace</code> and <code>portName</code>, the deployment would fail with the error <code>org.jboss.ws.WSException: Cannot find port in wsdl</code>. The cause of this issue was a regression introduced by changes in how temporary files are handled, and has been fixed in this release.</para>
      Show
      <para>If two web services were defined with the same <code>serviceName</code> but different <code>endpointInterface</code>, <code>targetNamespace</code> and <code>portName</code>, the deployment would fail with the error <code>org.jboss.ws.WSException: Cannot find port in wsdl</code>. The cause of this issue was a regression introduced by changes in how temporary files are handled, and has been fixed in this release.</para>
    • Documented as Resolved Issue
    • NEW

      If you define two web services with the same serviceName but different endpointInterface, targetNamespace and portName, you get the error org.jboss.ws.WSException: Cannot find port in wsdl:

      I've done some digging and this is because of the changes introduced in JBPAPP-9520 and possibly JBPAPP-8018. The issue is that the because the temp file process has been improved so that now only one temp WSDL is created per WS. This has an affect on how the method replaceAddressLocation works. The first WS is processed fine, a temp WSDL is created. When the second WS is processed and it's definitions are added to the wsMetaData map using the tmp file as the key, it isn't added as the previous WS file already exists (in fact the method to add it isn't even called). So when we fetch the WSDLDefinitions, the old wsMetaData is returned. A check in MetaDataBuilder.java checks if the wsdlPortName matches the portname currently being processed and this fails causing the error we see.

      A workaround would be to use wsdlLocation and include them in your application, however this causes a hang in JBoss after the services have been deployed with the WARN below

      10:31:45,463 WARN [JBossEntityResolver] Trying to resolve systemId as a non-file URL: http://127.0.0.1:8080/DuplicateServices/HelloWorld?wsdl&resource=HelloWorldInterface_PortType2303785186919836228.wsdl

              rdickens_jira Russell Dickenson (Inactive)
              rhn-support-mus Mustafa Musaji
              Tyler Kelly Tyler Kelly (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: