You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jhon Sanabria <jo...@eisc.univalle.edu.co> on 2003/08/20 23:47:45 UTC

How to define an array of array of string


Saludos

i'll be very thankful for your attention. i want to return, from one
web service, an array of array of string. How to define it in the source
code of the client.

            QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
            call.setReturnType(QNAME_TYPE_STRING);

i know that in the code above return a string, what's the code to
represent array of array.

thanks a lot for your attention.

Que esten bien.


Re: How to define an array of array of string

Posted by Anne Thomas Manes <an...@manes.net>.
Rather than using soapenc:arrayOfString, I suggest that you define your own 
complex types.

At 09:04 AM 8/22/2003 +0600, you wrote:
>hi,
>Array is not defined as a type in XSD. U may look at the SOAP encoding which
>has the defined array types.I beleive it is ok for yr prob to use the SOAP
>encoding for arraya.
>regards,
>Jeyakumaran.C
>----- Original Message -----
>From: "Jhon Sanabria" <jo...@eisc.univalle.edu.co>
>To: <ax...@ws.apache.org>
>Sent: Thursday, August 21, 2003 3:47 AM
>Subject: How to define an array of array of string
>
>
> >
> >
> > Saludos
> >
> > i'll be very thankful for your attention. i want to return, from one
> > web service, an array of array of string. How to define it in the source
> > code of the client.
> >
> >             QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
> >             call.setReturnType(QNAME_TYPE_STRING);
> >
> > i know that in the code above return a string, what's the code to
> > represent array of array.
> >
> > thanks a lot for your attention.
> >
> > Que esten bien.
> >


Re: How to define an array of array of string

Posted by "Jeyakumaran.C" <jk...@vijayaba.cse.mrt.ac.lk>.
hi,
Array is not defined as a type in XSD. U may look at the SOAP encoding which
has the defined array types.I beleive it is ok for yr prob to use the SOAP
encoding for arraya.
regards,
Jeyakumaran.C
----- Original Message -----
From: "Jhon Sanabria" <jo...@eisc.univalle.edu.co>
To: <ax...@ws.apache.org>
Sent: Thursday, August 21, 2003 3:47 AM
Subject: How to define an array of array of string


>
>
> Saludos
>
> i'll be very thankful for your attention. i want to return, from one
> web service, an array of array of string. How to define it in the source
> code of the client.
>
>             QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
>             call.setReturnType(QNAME_TYPE_STRING);
>
> i know that in the code above return a string, what's the code to
> represent array of array.
>
> thanks a lot for your attention.
>
> Que esten bien.
>


Re: How to define an array of array of string

Posted by vairamuthu thayapavan <vt...@vijayaba.cse.mrt.ac.lk>.
hi Jhon Sanabria

sorry,some wrong in previous mail.
first create a class that give the way to return the array of array (call
that class Array2 as a bean).
QName qn = new QName( "urn:myarray2", "Array2" );

then register that type
call.registerTypeMapping(Array2 .class, qn,new
org.apache.axis.encoding.ser.BeanSerializerFactory(Array2 .class, qn), new
org.apache.axis.encoding.ser.BeanDeserializerFactory(Array2 .class, qn));
then set return type as

call.setReturnType(qn);

then u can return the result using invke method in usual way

regards

thayapavan






----- Original Message ----- 
From: "Jhon Sanabria" <jo...@eisc.univalle.edu.co>
To: <ax...@ws.apache.org>
Sent: Thursday, August 21, 2003 3:47 AM
Subject: How to define an array of array of string


> 
> 
> Saludos
> 
> i'll be very thankful for your attention. i want to return, from one
> web service, an array of array of string. How to define it in the source
> code of the client.
> 
>             QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
>             call.setReturnType(QNAME_TYPE_STRING);
> 
> i know that in the code above return a string, what's the code to
> represent array of array.
> 
> thanks a lot for your attention.
> 
> Que esten bien.
> 
> 



Re: How to define an array of array of string

Posted by vairamuthu thayapavan <vt...@vijayaba.cse.mrt.ac.lk>.
hi Jhon Sanabria

first create a class that give the way to return the array of array (call
that class Array2 as a bean).
QName qn = new QName( "urn:myarray2", "Array2" );

then register that type
call.registerTypeMapping(Array2 .class, qn,new
org.apache.axis.encoding.ser.BeanSerializerFactory(Array2 .class, qn), new
org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class, qn));
then set return type as

call.setReturnType(qn);

then u can return the result using invke method in usual way

regards

thayapavan





----- Original Message -----
From: "Jhon Sanabria" <jo...@eisc.univalle.edu.co>
To: <ax...@ws.apache.org>
Sent: Thursday, August 21, 2003 3:47 AM
Subject: How to define an array of array of string


>
>
> Saludos
>
> i'll be very thankful for your attention. i want to return, from one
> web service, an array of array of string. How to define it in the source
> code of the client.
>
>             QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
>             call.setReturnType(QNAME_TYPE_STRING);
>
> i know that in the code above return a string, what's the code to
> represent array of array.
>
> thanks a lot for your attention.
>
> Que esten bien.
>
>