unbounded maxOccurs is ignored for groups and sequences
-------------------------------------------------------
Key: WSCOMMONS-73
URL: http://issues.apache.org/jira/browse/WSCOMMONS-73
Project: WS-Commons
Issue Type: Bug
Components: XmlSchema
Environment: Windows XP
Reporter: Barney Wrightson
Similar to the bug with choice elements as reported in
https://issues.apache.org/jira/browse/AXIS2-998 sequences and groups with
maxOccurs set to unbounded only accept a single instance of the elements inside
the tags.
eg for input like:
<test>
<choice1>1</choice1>
<choice2>string</choice2>
<choice1>2</choice1>
</test>
where test is defined as one of the 3 complex types below, only the code
generated for the UnboundedChoice type accepts this input as valid. I believe
all three should be equivalent.
<xsd:group name="choiceGrp">
<xsd:choice>
<xsd:element name="choice1" type="xsd:int">
<xsd:element name="choice2" type="xsd:string">
</xsd:choice>
</xsd:group>
<xsd:complexType name="UnboundedChoice">
<xsd:sequence>
<!-- ok after fix for AXIS2-998 -->
<xsd:choice minOccurs=0 maxOccurs="unbounded">
<xsd:element name="choice1" type="xsd:int">
<xsd:element name="choice2" type="xsd:string">
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UnboundedGroup">
<!-- unbounded ignored-->
<xsd:sequence>
<xsd:group ref="choiceGroup" minOccurs=0 maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UnboundedSequence">
<!-- unbounded ignored-->
<xsd:sequence minOccurs=0 maxOccurs="unbounded">
<xsd:group ref="choiceGroup" />
</xsd:sequence>
</xsd:complexType>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]