I created an XSD containing the following complex type:
<xs:complexType name="ReturnTooManyElementResponseType">
<xs:complexContent>
<xs:extension base="msgbase:ResponseBaseType">
<xs:sequence>
<xs:element name="SomeElement" type="xs:string" minOccurs="1" maxOccurs="3"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Then created a Netbeans JAVA project to generate JAXB classes from the schema.
The generated class for "ReturnTooManyElementResponseType" defined the member SomeElement as a "java.util.List<String>".
I then created a Web Service, which contains a method with the generated JAXB class as its return parameter.
When deployed to a Glassfish v2 instance, the schemas referenced by the WSDL contained "ReturnTooManyElementResponseType" complex type; however the "minOccurs" and "maxOccurs" were missing. The cardinality was simply set to "maxOccurs=unbounded".
=================
It appears that, when generating the WSDL and the dependent schemas, the JAXB generated classes are used instead of the original XSDs.
Is this correct?
If yes, are there ways to modify this behaviour and force the use of the original XSDs.
[Message sent by forum member 'lincoln_nrw' (lincoln_nrw)]
http://forums.java.net/jive/thread.jspa?messageID=262332