axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Axis array serialization problem
Date Wed, 23 Aug 2006 12:01:37 GMT
How does it fail?

On 8/23/06, HHDirecto. Net <hhdirecto@gmail.com> wrote:
>
>
> Thanks. I solved it with a array of int. But I have too an array of class
> and it fails. This is my wsdl:
>
> <complexType name="PlantaIW">
> <sequence>
> <element name="idPlanta" type="xsd:int"/>
> <element name="nombre" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
>
> <complexType name="UsuarioIW">
> <sequence>
>
>  <element name="email" nillable="true" type="xsd:string"/>
> <element name="nombre" nillable="true" type="xsd:string"/>
> <element maxOccurs="unbounded" name="permisos" nillable="true"
> type="xsd:int"/>
> <element maxOccurs="unbounded" name="plantas" nillable="true"
> type="tns1:PlantaIW"/>
> </sequence>
> </complexType>
>
>
> Thanks in advance
>
> > >> 2006/8/22, Anne Thomas Manes < atmanes@gmail.com>:
> > >> > This is an unresolved bug in Axis.
> > >> > Define your internal array as unwrapped:
> > >> >
> > >> > <complexType name="MyUser">
> > >> > <sequence>
> > >> > <element name="name" nillable="true" type="xsd:string"/>
> > >> > <element name="email" nillable="true" type="xsd:string"/>
> > >> > <element name="permisos" nillable="true" type="xsd:int"
> > >> maxOccurs="unbounded"/>
> > >> > </sequence>
> > >> > </complexType>
> > >> >
> > >> > Anne
> > >> >
> > >> > On 8/22/06, HHDirecto. Net < hhdirecto@gmail.com> wrote:
> > >> > >
> > >> > > I use "soapenv:Envelope ".
> > >> > >
> > >> > > My array is defined in wsdl as:
> > >> > > <complexType name="MyUser">
> > >> > >  <sequence>
> > >> > > <element name="name" nillable="true" type="xsd:string"/>
> > >> > > <element name="email" nillable="true" type="xsd:string"/>
> > >> > > <element name="permisos" nillable="true"
> > type="impl:ArrayOf_xsd_int
> > >> > > "/>
> > >> > > </sequence>
> > >> > > </complexType>
> > >> > >
> > >> > > And then:
> > >> > > <complexType name="ArrayOf_xsd_int">
> > >> > > <sequence>
> > >> > > <element maxOccurs="unbounded" minOccurs="0" name="item"
> > >> type="xsd:int"/>
> > >> > > </sequence>
> > >> > >
> > >> > > The response of my webservice is:
> > >> > > <?xml version="1.0"
> encoding="utf-8"?><soapenv:Envelope
> > >> > > xmlns:soapenv="
> > >> http://schemas.xmlsoap.org/soap/envelope/"
> > >> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema "
> > >> xmlns:xsi="
> > >> > > http://www.w3.org/2001/XMLSchema-instance
> > >> "><soapenv:Body>
> > >> > > <validarResponse
> > >> > > xmlns="http://interfazweb.serviciosweb.myapp.com">
> > >> > > <validarReturn><name>Juan</name><email>
> > >> usuario1@pepe..com</email>
> > >> > >
> > >>
> <permisos><permisos>1</permisos><permisos>2</permisos></permisos>
> > >> > >
> > >>
> </validarReturn></validarResponse></soapenv:Body></soapenv:Envelope>
> > >> > >
> > >> > > I think the response should be
> > >> > > <permisos><int>1</ int><int>2</int
></permisos>
> > >> > >
> > >> > > What is the problem?
> > >> > >
> > >> > > Thanksss
> > >> > >
> > >> > >
> > >> > > >
> > >> > >  ----- Original Message -----
> > >> > > From: "Anne Thomas Manes" < atmanes@gmail.com>
> > >> > > To: <axis-user@ws.apache.org >; "Martin Gainty" <
> > >> > > mgainty@hotmail.com>
> > >> > > Sent: Monday, August 21, 2006 4:34 PM
> > >> > > Subject: Re: Axis array serialization problem
> > >> > >
> > >> > >
> > >> > > > These are not good samples. You don't want to extend
> > soapenc:Array
> > >> > > > unless you are using SOAP encoding, and if you are using
SOAP
> > >> > > > encoding, then you don't want to specify maxOccurs="unbounded",
> > and
> > >> > > > you should specify the wsdl:arrayType attribute. An example
of
> > a
> > >> > > > proper definition of an array that extends soapenc:Array
is:
> > >> > > >
> > >> > > >           <complexType name="ArrayOfFloat">
> > >> > > >              <complexContent>
> > >> > > >                  <restriction base="soapenc:Array">
> > >> > > >                      <attribute
> > >> ref="soapenc:arrayType"
> > >> > > > wsdl:arrayType="xsd:float[]"/>
> > >> > > >                  </restriction>
> > >> > > >              </complexContent>
> > >> > >  >           </complexType>
> > >> > > >
> > >> > > > If you are not using SOAP encoding, then an example of a
proper
> > >> > > > definition of an array is:
> > >> > > >
> > >> > > >           <complexType name="aliasArray">
> > >> > > >              <sequence>
> > >> > > >                  <element name="Alias" type="string"
> > >> > > > maxOccurs="unbounded"/>
> > >> > > >              </sequence>
> > >> > > >           </complexType>
> > >> > > >
> > >> > > > Anne
> > >> > > >
> > >> > > > On 8/21/06, Martin Gainty < mgainty@hotmail.com> wrote:
> > >> > > >>
> > >> > > >>
> > >> > > >> <!-- excerpts from
> > >> > > >> /axis-1_4/test/wsdl/arrays/ArrayTest.wsdl -->
> > >> > > >>
> > >> > > >> <!-- An example of an array of Strings -->
> > >> > > >>             <xsd:complexType name="petArray">
> > >> > > >>                 <xsd:complexContent>
> > >> > > >>                     <xsd:restriction base="soapenc:Array">
> > >> > > >>                         <xsd:sequence>
> > >> > > >>                             <xsd:element name="alias"
> > >> type="xsd:string"
> > >> > > >> maxOccurs="unbounded"/>
> > >> > > >>                         </xsd:sequence>
> > >> > > >>                     </xsd:restriction>
> > >> > > >>                 </xsd:complexContent>
> > >> > > >>             </xsd:complexType>
> > >> > > >>
> > >> > > >> <!---- An example of an Array of ints ---------->\
> > >> > > >>             <xsd:complexType name="intArray">
> > >> > > >>                 <xsd:complexContent>
> > >> > > >>                     <xsd:restriction base="soapenc:Array">
> > >> > > >>                         <xsd:sequence>
> > >> > > >>                             <xsd:element name="alias"
> > >> > > >> type="xsd:int"
> > >> > > >> maxOccurs="unbounded"/>
> > >> > > >>                         </xsd:sequence>
> > >> > > >>                     </xsd:restriction>
> > >> > > >>                 </xsd:complexContent>
> > >> > > >>             </xsd:complexType>
> > >> > > >>
> > >> > > >> HTH,
> > >> > > >> M-
> > >> > > >>
> > >> > >
> > >>
> *********************************************************************
> > >> > > >> This email message and any files transmitted with it
contain
> > >> confidential
> > >> > > >> information intended only for the person(s) to whom
this email
> > >> message is
> > >> > > >> addressed.  If you have received this email message
in error,
> > >> > > >> please
> > >> > > >> notify
> > >> > > >> the sender immediately by telephone or email and destroy
the
> > >> > > >> original
> > >> > > >> message without making a copy.  Thank you.
> > >> > > >>
> > >> > > >>
> > >> > > >>
> > >> > > >>
> > >> > > >>
> > >> > > >> ----- Original Message -----
> > >> > > >> From: HHDirecto.Net
> > >> > > >> To: axis-user@ws.apache.org
> > >> > > >> Sent: Monday, August 21, 2006 7:11 AM
> > >> > > >> Subject: Axis array serialization problem
> > >> > > >>
> > >> > > >> I have a problem returning a array in axis.
> > >> > > >> I read about it in
> > >> > > >>
> > >> > >
> > >>
> http://marc2.theaimsgroup.com/?l=axis-dev&m=114909771503014&w=2
> > >> > > >>
> > >> > > >> And I read about this solution
> > >> > > >>
> > >> > >
> > >>
> http://marc.theaimsgroup.com/?l=axis-user&m=109631383200039&w=2
> > >> > > >>
> > >> > >
> > >>
> http://www.mail-archive.com/axis-user@xml.apache.org/msg26566.html
> > >> > > >>
> > >> > > >> But this patch don't run in axis 1-4.
> > >> > > >>
> > >> > > >> Anyone knows about it?
> > >> > > >>
> > >> > > >> Thanks in advance
> > >> > > >>
> > >> > > >> http://www.hhdirecto.net
> > >> > > >> http://www.dechiste.com
> > >> > > >>
> > >> > > >
> > >> > > >
> > >> > >
> > >>
> ---------------------------------------------------------------------
> > >> > > > 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