Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1217

WSDLtoJava Namespace to package mapping does not support multiple namespaces

XMLWordPrintable

    • Workaround Exists
    • Hide

      Manually move the classes to their appropriate packages.

      Show
      Manually move the classes to their appropriate packages.

      Consider the following WSDL:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name='MySEIService' targetNamespace='http://javatype.mycompany.com' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://other.com' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://javatype.mycompany.com' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
      <types>
      <schema targetNamespace='http://other.com' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://other.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <complexType name='TestException'>
      <sequence/>
      </complexType>
      <element name='TestException' type='tns:TestException'/>
      </schema>
      </types>
      <message name='MySEI_testException'/>
      <message name='MySEI_testExceptionResponse'/>
      <message name='TestException'>
      <part element='ns1:TestException' name='TestException'/>
      </message>
      <portType name='MySEI'>
      <operation name='testException'>
      <input message='tns:MySEI_testException'/>
      <output message='tns:MySEI_testExceptionResponse'/>
      <fault message='tns:TestException' name='TestException'/>
      </operation>
      </portType>
      <binding name='MySEIBinding' type='tns:MySEI'>
      <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
      <operation name='testException'>
      <soap:operation soapAction=''/>
      <input>
      <soap:body namespace='http://javatype.mycompany.com' use='literal'/>
      </input>
      <output>
      <soap:body namespace='http://javatype.mycompany.com' use='literal'/>
      </output>
      <fault name='TestException'>
      <soap:fault name='TestException' use='literal'/>
      </fault>
      </operation>
      </binding>
      <service name='MySEIService'>
      <port binding='tns:MySEIBinding' name='MySEIPort'>
      <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
      </port>
      </service>
      </definitions>

      Using the following wstools config:

      <configuration xmlns="http://www.jboss.org/jbossws-tools">
      <global>
      <package-namespace package="com.other" namespace="http://other.com"/>
      <package-namespace package="com.mycompany.javatype" namespace="http://javatype.mycompany.com"/>
      </global>
      <wsdl-java file="MySEIService.wsdl">
      <mapping file="jaxrpc-mapping.xml" />
      </wsdl-java>
      </configuration>

      The TestException class is not generated in the com.other package.

              mageshbk_jira Magesh Bojan (Inactive)
              mageshbk_jira Magesh Bojan (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 5 hours
                  4d 5h