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

JBoss ignores metadata supplied in a JAX-RPC Mapping DD. Part 2.

XMLWordPrintable

      In using the WS subsystem of JBoss, I observed that it ignores a fair amount of metadata supplied in a JAX-RPC Mapping DD. In particular I observed the following:

      java-xml-type-mapping.

      JBoss ignores information provided by element bindings in favour of JavaBean introspection. In other words, given the following:

      Code:
      class St {
      private Interface s;
      Interface getS()

      { return s; }

      void setS(Interface s)

      { this.s = s; }

      }

      class RefType implements Interface

      {...}

      <xsd:complexType name="St">
      <xsd:all>
      <xsd:element name="s" type="tns:RefType"/>
      </xsd:all>
      </xsd:complexType>

      <xsd:complexType name="RefType">
      <xsd:all>
      ...
      </xsd:all>
      </xsd:complexType>

      I want to ensure that the s element of the St complex type is mapped not to the Interface class but to the RefType class. To accomplish that I do the following:

      a) Map XML St to Java St:
      Code:
      <java-xml-type-mapping>
      <java-type>St</java-type>
      <root-type-qname xmlns:typeNS="http://namesp">typeNS:St</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>s</java-variable-name>
      <xml-element-name>s</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>

      b) Map XML RefType to Java RefType:
      Code:
      <java-xml-type-mapping>
      <java-type>RefType</java-type>
      <root-type-qname xmlns:typeNS="http://namesp">typeNS:RefType </root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      ...
      </variable-mapping>
      </java-xml-type-mapping>

      c) Map the s element of St to RefType to prevent it from being taken as the Interface class through JavaBean introspection:
      Code:
      <java-xml-type-mapping>
      <java-type>RefType </java-type>
      <anonymous-type-qname>http://namesp:St>s</anonymous-type-qname>
      <qname-scope>element</qname-scope>
      </java-xml-type-mapping>

      JBoss correctly processes a) and b) but completely disregards c), thus failing to support this J2EE-compliant scenario.

              tdiesler@redhat.com Thomas Diesler
              ilchen_jira Andrei Iltchenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: