JAX-RPC Mapping DD, what metadata is used by JBoss?
ilchen Aug 31, 2005 8:28 AMIn 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:
1. java-xml-type-mapping. Jboss ignores the xml-element-name element on the assumption that its value is the same as that of java-variable-name. E.g. with the following info in the typemapping DD, JBoss will fail to deserialize incoming requests:
<java-type>pack.JavaType</java-type> <root-type-qname xmlns:typeNS="http://namesp">typeNS:XMLType</root-type-qname> <qname-scope>complexType</qname-scope> <variable-mapping> <java-variable-name>typedElements</java-variable-name> <xml-element-name>collectionElements</xml-element-name> </variable-mapping> </java-xml-type-mapping>
2. java-xml-type-mapping. JBoss ignores information provided by element bindings in favour of JavaBean introspection. In other words, given the following:
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:
<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:
<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:
<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 scenario.
3. exception-mapping. JBoss ignores information provided by constructor-parameter-order...
It would be very beneficial for the JBoss community if it were clarified what metadata from JAX-RPC Mapping DDs is actually used by JBoss and what ignored.
Thank you in advance.
Andrei.