Title: WSDL2Java genertion bug?

Hi All

I have a schema which contains a certain complexType such as:

        <xs:complexType name="OperatorType">
                <xs:sequence>
                        <xs:choice>
                                <xs:element name="EXCHANGE" type="part:EXCHANGEOperatorType" minOccurs="0"/>
                                <xs:element name="APPLY" type="part:REDUCEOperatorType" minOccurs="0"/>
                                <xs:element name="HASH_JOIN" type="part:HASHJOINOperatorType" minOccurs="0"/>
                                <xs:element name="HASH_LOOPS" type="part:HASHLOOPSJOINOperatorType" minOccurs="0"/>
                                <xs:element name="OPERATION_CALL" type="part:OPERATIONCALLOperatorType" minOccurs="0"/>
                                <xs:element name="PRINT" type="part:PRINTOperatorType" minOccurs="0"/>
                                <xs:element name="TABLE_SCAN" type="part:TableScanOperatorType" minOccurs="0"/>
                                <xs:element name="UNNEST" type="part:UNNESTOperatorType" minOccurs="0"/>
                        </xs:choice>
                        <xs:element name="tupleType">
                                <xs:complexType>
                                        <xs:sequence maxOccurs="unbounded">
                                                <xs:element name="name" type="xs:string"/>
                                                <xs:element name="type" type="xs:string"/>
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                </xs:sequence>
                <xs:attribute name="operatorID" type="xs:string" use="required"/>
                <xs:attribute name="operatorFlagType" type="part:OperatorFlagType" use="required"/>
                <xs:attribute name="isRootOperator" type="xs:boolean" use="optional"/>
        </xs:complexType>

Please note the "maxOccurs" in the sequence within the complex type "tupleType". A valid XML corresponding to this schema (as generated by XMLSpy) looks like:

                <tupleType>
                        <name>String</name>
                        <type>String</type>
                        <name>String</name>
                        <type>String</type>
                        <name>String</name>
                        <type>String</type>
                </tupleType>

But the generated code doesn't correspond to this multiple occurrences of the "name-type" pair. I can add another element (say item) and make this unbounded, so that the XML bit would look like:

                <tupleType>
                        <item>
                                <name>Text</name>
                                <type>Text</type>
                        </item>
                        <item>
                                <name>Text</name>
                                <type>Text</type>
                        </item>
                        <item>
                                <name>Text</name>
                                <type>Text</type>
                        </item>
                </tupleType>

Axis generated code does cater for this (if the extra element is added to the schema).

But why would it be required if the first bit of XML is perfectly valid as per the schema definitions? Is this a bug in the Axis code generation? Is it already in the bugzilla?

Regards
Arijit

"And when the night is cloudy,
There is still a light that shines on me,
Shine on until tomorrow, let it be. "

John Lennon/Paul McCartney

Reply via email to