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>
<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>
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[<minOccursValue>,<maxOccursValue>]" 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[<minOccursValue>,<maxOccursValue>]" where R is the name of the referent element. The name is entered as an anonymous-type-qname.
They aren't needed because they don't provide any information that isn't already in the WSDL file. The only reason why we would want to add them is if we wanted to ensure compatibility with a stack that does require them. This really isn't a goal, since our tools are only intended to be ran used against our stack.