You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org> on 2007/04/06 09:18:32 UTC

[jira] Commented: (WSCOMMONS-73) unbounded maxOccurs is ignored for groups and sequences

    [ https://issues.apache.org/jira/browse/WSCOMMONS-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487178 ] 

Ajith Harshana Ranabahu commented on WSCOMMONS-73:
--------------------------------------------------

This seems to be an issue that belongs to the Axis2 Jira.  Please confirm

> unbounded maxOccurs is ignored for groups and sequences
> -------------------------------------------------------
>
>                 Key: WSCOMMONS-73
>                 URL: https://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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org