Hi Anne, What you said is true. I believe that maxOccures="unbounded" should be a syntax error for a choice. Can anybody think a use of this in choice?
Regards, Shehan -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, 12 September 2008 9:57 PM To: [email protected] Subject: Re: wsdl2java and wsdl problem The type declaration is valid. <s:choice> indicates that the element may contain one of the elements listed in the choice group. The minOccurs="0" attribute indicates that the element is optional. It is not intended to be an array; therefore, it would be inappropriate to say maxOccurs="unbounded". Anne On Fri, Sep 12, 2008 at 12:04 AM, Shehan Simen <[EMAIL PROTECTED]> wrote: > Hi, > > I have a question about wsdl. The wsdl2java fails in following case. But I > feel the wsdl is wrong. > > I got the following element in a complex type. > > > > <s:complexType name="ResponseBusinessEntity" mixed="false"> > > <s:complexContent mixed="false"> > > <s:extension base="tns:ResponseBody"> > > <s:sequence> > > <s:choice minOccurs="0" maxOccurs="unbounded"> > > <s:element name="legalName" > type="tns:IndividualName" minOccurs="0"/> > > <s:element name="mainName" > type="tns:OrganisationName" minOccurs="0"/> > > </s:choice> > > </s:sequence> > > </s:extension> > > </s:complexContent> > > </s:complexType> > > > > I believe this is logically wrong or useless. The choice is multiple. What > is the use of it? > > Does this means there can be 5 choices with 3 legalName and 2 mainName? Then > what is use of choice? We can just use both of them without choice, but with > minOccurs="0" maxOccurs="unbounded" > > I believe it should be as follows. > > > > <s:choice minOccurs="0" maxOccurs="1"> > > <s:element name="legalName" > type="tns:IndividualName" minOccurs="0" maxOccurs="unbounded"/> > > <s:element name="mainName" > type="tns:OrganisationName" minOccurs="0" maxOccurs="unbounded"/> > > </s:choice> > > > > Anyway axis2 does not generate stub properly for the first case. > > What do you guys think? > > > > Please let me know if I am wrong. > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
