users@glassfish.java.net

Netbeans 6.0.1 + Glassfish v2 (Mismatch between WSDL referenced XSD and org

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Mar 2008 19:14:52 PST

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