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

Java to WSDL - Invalid JAXRPC mapping generated for inherited classes

XMLWordPrintable

      For complex types with an inheritence hierarchy of more than 2 the 'java-xml-type-mapping' in the generated jax-rpc mapping contains the variables from the grand parent (and higher) mapped multiple times.

      e.g. for the following class hierarchy: -

      public class LevelOne
      {

      private String fieldOne;

      public String getFieldOne()

      { return fieldOne; }

      public void setFieldOne(String fieldOne)

      { this.fieldOne = fieldOne; }

      }

      public class LevelTwo extends LevelOne
      {

      private String fieldTwo;

      public String getFieldTwo()

      { return fieldTwo; }

      public void setFieldTwo(String fieldTwo)

      { this.fieldTwo = fieldTwo; }

      }

      • * Same pattern for LevelThree and LevelFour

      The following mappings are generated in the jaxrpc mapping: -

      <java-xml-type-mapping>
      <java-type>org.jboss.test.ws.tools.jbws1538.LevelThree</java-type>
      <root-type-qname xmlns:typeNS='http://org.jboss.test.ws/jbws1538/types'>typeNS:LevelThree</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldTwo</java-variable-name>
      <xml-element-name>fieldTwo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldThree</java-variable-name>
      <xml-element-name>fieldThree</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

      and

      <java-xml-type-mapping>
      <java-type>org.jboss.test.ws.tools.jbws1538.LevelFour</java-type>
      <root-type-qname xmlns:typeNS='http://org.jboss.test.ws/jbws1538/types'>typeNS:LevelFour</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldTwo</java-variable-name>
      <xml-element-name>fieldTwo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldOne</java-variable-name>
      <xml-element-name>fieldOne</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldTwo</java-variable-name>
      <xml-element-name>fieldTwo</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldThree</java-variable-name>
      <xml-element-name>fieldThree</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>fieldFour</java-variable-name>
      <xml-element-name>fieldFour</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

              darran.lofthouse@redhat.com Darran Lofthouse
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: