axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Potter" <pot...@gmail.com>
Subject Re: minoccurs in sequence
Date Wed, 27 Jun 2007 21:05:01 GMT
Thanks,
That looks like it is going to work.

I am rethinking how I am organizing my wsdl.  I will move to using
complexTypes for everything, even if it does not have multiple
occurances.  That will solve my other problem which is Axis' lack of
support for multi-part messages.

-- 
Michael Potter

On 6/26/07, Ali, Haneef <haneef.ali@hp.com> wrote:
>
> I believe this should work
>
>
>   <xs:complexType name="MyType" />
>        <xs:sequence>
>             <xs:element name="MyOne" type="xs:string" />
>              <xs:element name="MyTwo" type="xs:string" />
>              <xs:element name="MyThree" type="xs:string" />
>         </xs:sequence>
>   </xs:complexType>
>
>   <xs:complexType name="MyArrayType">
>        <xs:sequence>
>             <xs:element name="My" type="MyType" minOccurs="1"  maxOccurs="unbounded"
/>
>        <xs:sequence>
>   </xs:complexType>
>
>   <xs:element name="MyArray" type="MyArrayType" />
>
>
> Thanks,
>
> Haneef
>
> -----Original Message-----
> From: Michael Potter [mailto:pottmi@gmail.com]
> Sent: Tue 6/26/2007 5:22 PM
> To: axis-user@ws.apache.org
> Subject: Re: minoccurs in sequence
>
> mmm,
>
> As an exercise to communicate what I want the schema to do it will be valuable:
>
>     <MyArray>
>           <My>
>              <MyOne>some data 1</MyOne>
>              <MyTwo>some data 2</MyTwo>
>              <MyThree>some data 3</MyThree>
>           </My>
>           <My>
>              <MyOne>more data 1</MyOne>
>              <MyTwo>more data 2</MyTwo>
>              <MyThree>more data 3</MyThree>
>           </My>
>           ...
>     </MyArray>
>
> --
> Michael Potter
>
> On 6/26/07, Ali, Haneef <haneef.ali@hp.com> wrote:
> > Hi,
> >
> > Can you post the actual xml fragment you want to generate? I don't think
> > your schema is correct. Axis document says that it can't support
> > minOccurs in sequence. It supports minOccurs in element.
> >
> >  <sequence minOccurs="0" maxOccurs="unbounded"></sequence>  --- Not
> > supported
> >
> >  <xs:element name="My" minOccurs="1" maxOccurs="unbounded" /> -- Is
> > supported
> >
> > Haneef
> >
> > -----Original Message-----
> > From: Michael Potter [mailto:pottmi@gmail.com]
> > Sent: Tuesday, June 26, 2007 4:08 PM
> > To: axis-user@ws.apache.org
> > Subject: minoccurs in sequence
> >
> > I am looking for alternatives to support multiple occurances.
> >
> > I have WSDL that looks like this:
> > -------------------------
> > <wsdl:types>
> >      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > attributeFormDefault="qualified" elementFormDefault="qualified"
> > targetNamespace="http://quickstart.samples/xsd">
> >      <xs:element name="MyArray">
> >         <xs:complexType>
> >            <xs:element name="My" minOccurs="1" maxOccurs="unbounded" />
> >               <xs:sequence>
> >               <xs:element name="MyOne" type="xs:string" />
> >               <xs:element name="MyTwo" type="xs:string" />
> >               <xs:element name="MyThree" type="xs:string" />
> >            </xs:sequence>
> >         </xs:complexType>
> >      </xs:element>
> >      </xs:schema>
> >   </wsdl:types>
> > -------------------------
> >
> > When I run:
> > -------------------------
> > ksh $AXIS2_HOME/bin/wsdl2java.sh -uri ./MySample.wsdl -p
> > samples.quickstart -o . -d adb -s -wv 1.1 -ss -sd
> > -------------------------
> >
> > The java code that gets generated does not support multiple occurances
> > of this type.
> >
> > Which seems to be expected because of this limitation listed on
> > http://ws.apache.org/axis2/:
> > --------------------------
> > ADB databinding does not support minOccurs and maxOccurs attributes in
> > sequence and choice elements (i.e., <sequence minOccurs="0"
> > maxOccurs="unbounded"></sequence>)
> > --------------------------
> >
> > What are my alternatives to support multiple occurances?
> >
> > Do I have to put min/maxoccurs on each element?
> >
> > Can I just remove sequence and have it generate java that support
> > multiple occurances?
> >
> > Can wsdl2java be configured to report this and similar errors?
> >
> > --
> > Michael Potter
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Mime
View raw message