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 Fabrício Cabral <fa...@gmail.com> on 2009/03/20 06:05:06 UTC
Can a WebService method return a List or a List?
Hello all!
I'm using Axis2 1.4.1, Eclipse Ganymede + Axis2 codegen plugin to
do the webservice and webservice client. I'm looking for develop a
method that return a object type List (List<String>). Searching in
the Internet, some people say that a WS can't return a List and
others say it is possbile. So, I'd like know:
1. Can a WebService method return a List or a List<String>?
2. If (1) answer is yes, how can I do that?
3. If (1) answer is no, how can I return several objects?
Thanks in advance,
--
--fx
Re: Can a WebService method return a List or a List?
Posted by Sagara Gunathunga <sa...@gmail.com>.
Hi Fabrício,
you can use an array to return multiple objects .
e.g.
public String[] getValues()
Thanks,
2009/3/20 Fabrício Cabral <fa...@gmail.com>:
> Hello all!
>
> I'm using Axis2 1.4.1, Eclipse Ganymede + Axis2 codegen plugin to
> do the webservice and webservice client. I'm looking for develop a
> method that return a object type List (List<String>). Searching in
> the Internet, some people say that a WS can't return a List and
> others say it is possbile. So, I'd like know:
>
> 1. Can a WebService method return a List or a List<String>?
>
> 2. If (1) answer is yes, how can I do that?
>
> 3. If (1) answer is no, how can I return several objects?
>
> Thanks in advance,
>
> --
> --fx
>
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/