From the following schema: -
| <schema
targetNamespace='http://test.jboss.org/ws/jbws1259/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://test.jboss.org/ws/jbws1259/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
| <complexType name='Person'>
| <sequence>
| <element name='firstName' nillable='true'
type='string'/>
| <element name='surname' nillable='true'
type='string'/>
| <element ref='tns:comment'/>
| </sequence>
| </complexType>
|
| <complexType name='TelephoneNumber'>
| <sequence>
| <element name='areaCode' nillable='true'
type='string'/>
| <element name='number' nillable='true'
type='string'/>
| <element ref='tns:comment'/>
| </sequence>
| </complexType>
|
| <element name='comment'>
| <complexType>
| <sequence>
| <element name='test' type='string' />
| <element ref='tns:comment' />
| </sequence>
| </complexType>
| </element>
|
| <element name='lookup' type='tns:Person' />
| <element name='lookupResponse' type='tns:TelephoneNumber'/>
| </schema>
wscompile generates the following mapping for comment: -
| <java-xml-type-mapping>
| <java-type>org.jboss.test.ws.jbws1259.Comment</java-type>
| <anonymous-type-qname
xmlns:typeNS='http://test.jboss.org/ws/jbws1259/types'>typeNS:...
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| <java-variable-name>test</java-variable-name>
| <xml-element-name>test</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>comment</java-variable-name>
| <xml-element-name>comment</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
We generate the following mapping (different qname because of the order we create the
mappings): -
| <java-xml-type-mapping>
| <java-type>org.jboss.test.ws.jbws1259.Comment</java-type>
|
<
anonymous-type-qname>http://test.jboss.org/ws/jbws1259/types:>Telep...
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| <java-variable-name>test</java-variable-name>
| <xml-element-name>test</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>comment</java-variable-name>
| <xml-element-name>comment</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
Looking at the Web Services for J2EE specification section 7.3.2.2 I think both of these
are wrong, shouldn't this be mapped according to use case 4? e.g.
<
anonymous-type-qname>http://test.jboss.org/ws/jbws1259/types:>comme...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000475#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...