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 Harikrishna Vemula <ha...@gmail.com> on 2008/12/01 11:12:22 UTC

Returning Multiple values

Hi
  I have a requirement, in that some methods will return multiple values.
So, which one is good whether to use Holders or to use a java bean as return
type?
I'm using axis 1.1 as my current product is still running on that...

-- 
Hari Krishna Vemula

RE: Returning Multiple values

Posted by Raghu Upadhyayula <ru...@responsys.com>.
Hi Harikrishna,

 

            My suggestion is to use a Java bean instead of an object
array.

 

Thanks

Raghu

 

________________________________

From: Chinmoy Chakraborty [mailto:cchinu@gmail.com] 
Sent: Monday, December 01, 2008 5:43 AM
To: axis-user@ws.apache.org
Subject: Re: Returning Multiple values

 

You can do that using object array...e,g.

 

Object[] obj = new Object[3];

obj[0] = name;

obj[1] = location;

obj[2] = address.....and so on..

 

>From the client end you can get the corresponding values from the
respective location of the object array....

 

HTH

Chinmoy

On Mon, Dec 1, 2008 at 4:23 PM, Harikrishna Vemula
<ha...@gmail.com> wrote:

 

Sorry, may be my question was not clear, the method has to return
multiple variables (ex. name, location, etc...)
Thanks in advance

 

-hari

 

On Mon, Dec 1, 2008 at 3:54 PM, Chinmoy Chakraborty <cc...@gmail.com>
wrote:

You can use object array for different values if you are using axis 1.x
...

 

Chinmoy

On Mon, Dec 1, 2008 at 3:42 PM, Harikrishna Vemula
<ha...@gmail.com> wrote:

Hi 

  I have a requirement, in that some methods will return multiple
values. So, which one is good whether to use Holders or to use a java
bean as return type?

I'm using axis 1.1 as my current product is still running on that...

-- 
Hari Krishna Vemula

 





 


Re: Returning Multiple values

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
You can do that using object array...e,g.

Object[] obj = new Object[3];
obj[0] = name;
obj[1] = location;
obj[2] = address.....and so on..

>From the client end you can get the corresponding values from the respective
location of the object array....

HTH
Chinmoy

On Mon, Dec 1, 2008 at 4:23 PM, Harikrishna Vemula
<ha...@gmail.com>wrote:

>
> Sorry, may be my question was not clear, the method has to return multiple
> variables (ex. name, location, etc...)
> Thanks in advance
>
> -hari
>
> On Mon, Dec 1, 2008 at 3:54 PM, Chinmoy Chakraborty <cc...@gmail.com>wrote:
>
>> You can use object array for different values if you are using axis 1.x
>> ...
>>
>> Chinmoy
>>
>>   On Mon, Dec 1, 2008 at 3:42 PM, Harikrishna Vemula <
>> hari.k.vemula@gmail.com> wrote:
>>
>>> Hi
>>>   I have a requirement, in that some methods will return multiple values.
>>> So, which one is good whether to use Holders or to use a java bean as return
>>> type?
>>> I'm using axis 1.1 as my current product is still running on that...
>>>
>>> --
>>> Hari Krishna Vemula
>>>
>>>
>>
>
>

Re: Returning Multiple values

Posted by Harikrishna Vemula <ha...@gmail.com>.
Sorry, may be my question was not clear, the method has to return multiple
variables (ex. name, location, etc...)
Thanks in advance

-hari

On Mon, Dec 1, 2008 at 3:54 PM, Chinmoy Chakraborty <cc...@gmail.com>wrote:

> You can use object array for different values if you are using axis 1.x ...
>
> Chinmoy
>
>   On Mon, Dec 1, 2008 at 3:42 PM, Harikrishna Vemula <
> hari.k.vemula@gmail.com> wrote:
>
>> Hi
>>   I have a requirement, in that some methods will return multiple values.
>> So, which one is good whether to use Holders or to use a java bean as return
>> type?
>> I'm using axis 1.1 as my current product is still running on that...
>>
>> --
>> Hari Krishna Vemula
>>
>>
>

Re: Returning Multiple values

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
You can use object array for different values if you are using axis 1.x ...

Chinmoy

On Mon, Dec 1, 2008 at 3:42 PM, Harikrishna Vemula
<ha...@gmail.com>wrote:

> Hi
>   I have a requirement, in that some methods will return multiple values.
> So, which one is good whether to use Holders or to use a java bean as return
> type?
> I'm using axis 1.1 as my current product is still running on that...
>
> --
> Hari Krishna Vemula
>
>