[jbossws-dev] [Design of JBoss Web Services] - JBWS-1260 and WSDL to Java Array Mappings

darran.lofthouse@jboss.com do-not-reply at jboss.com
Wed Dec 13 18:34:14 EST 2006


I am currently working on JBWS-1260, I have a set of 27 different WSDLs that I have put through wscompile and I am then putting through wstools to compare the generated artifacts.

Whenever wscompile encounters an element with a maxOccurs greater than '0' e.g.

  |    <complexType name='TelephoneNumber'>
  |     <sequence>
  |       <element name='number' nillable='true' type='string' maxOccurs='unbounded'/>
  |     </sequence>
  |    </complexType>
  | 

The generated jaxrpc mapping has it mapped as: -


  |   <java-xml-type-mapping>
  |     <java-type>java.lang.String[]</java-type>
  |     <anonymous-type-qname>http://test.jboss.org/ws/jbws1260/types:TelephoneNumber>number[1,unbounded]</anonymous-type-qname>
  |     <qname-scope>complexType</qname-scope>
  |   </java-xml-type-mapping>
  | 

This apears to be because of the following from the Web Services for J2EE 1.1 specification: -anonymous wrote : 
  | 
  | 3. If element E has a maxOccurs attribute greater than 1, then it also has a 'hidden' anonymous type called A. A is an array of the enclosed type. The qname-scope of A is complexType and the name of A is...
  | a. If E has a name attribute, then the name of A is "E[,]" where E is the value of E?s name attribute. The name is entered as an anonymous-type-qname.
  | b. If E has no name attribute, then the name of A is "R[,]" where R is the name of the referent element. The name is entered as an anonymous-type-qname.

And the examples in the specification apear to confirm this.

Is there any reason why we do no generate these mappings at all? Or should this be added?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993625#3993625

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993625



More information about the jbossws-dev mailing list