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 rajac <ra...@gmail.com> on 2007/01/26 06:56:47 UTC
returning Array from a web service method
Hi,
I am new to axis2-1.1. Currently I am trying to create a web service that
returns an array of Java custom Objects. I could not able to find sample
code from samples comes along with the axis2 distribution for this purpose.
Can anybody help me sending some sample code for the same. I am using
RPCServiceClient to get the result frm the web service.
Thanks.
Raja Chattopadhyay
--
View this message in context: http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449
Sent from the Axis - User mailing list archive at Nabble.com.
Re: returning Array from a web service method
Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi raja,
I don't think you can do that.
You mean you want to send java object instance direct to client.
Axis2 is SOAP stack, so its request and response are serialized to XML.
Axis2 can serialize JavaBean to XML, and can deserialize XML to
JavaBean.
kinichiro
--- rajac <ra...@gmail.com> wrote:
>
> Hi Kinichiro Inoguchi,
> I am returning the array which is of non Java Bean type
> and when
> I am trying to invoke the service I am not getting the value of array
> (i.e,
> Object[] response = serviceClient.invokeBlocking(opGetAddress,
> opGetAddressesArgs, returnTypes)). Although the length of the
> response is
> returning "1" but the when I am trying to get/retrieve the value from
> the
> response object its returning 'null'. I am not very sure if I am
> doing any
> mistake. Do I need to configure anything to get array value of Non
> Java Bean
> type?
>
> I am uploading the java files.
>
>
>
> Kinichiro Inoguchi wrote:
> >
> > Hi,
> >
> > If your "CustomJavaObject" is JavaBean,
> > I think you can return array of "CustomJavaObject",
> > and your service class below is right.
> >
> > --- rajac <ra...@gmail.com> wrote:
> >
> >>
> >> But it simply returning a Java Bean. But my purpose is to return
> an
> >> array of
> >> java objects.
> >>
> >> like :
> >> public CustomJavaObject[] getArray((){
> >> // set the CustomJavaObject[]
> >> // return CustomJavaObject[]
> >> }
> >>
> >>
> >> Regards,
> >> Raja
> >>
> >>
> >> Deepal Jayasinghe wrote:
> >> >
> >> > Hi rajac ;
> >> >
> >> >> Hi, I am new to axis2-1.1. Currently I am trying to create a
> web
> >> >> service that returns an array of Java custom Objects.
> >> >
> >> > You mean Java Bean ?
> >> > If so please have a look at Samples in Axis2 bistro
> >> >
> >> > Thanks
> >> > Deepal
> >> >
> >> >> I could not able to find sample code from samples comes along
> with
> >> the
> >> >> axis2 distribution for this purpose. Can anybody help me
> sending
> >> some
> >> >> sample code for the same. I am using RPCServiceClient to get
> the
> >> >> result frm the web service. Thanks. Raja Chattopadhyay
> >> >>
> >>
> >
>
------------------------------------------------------------------------
> >> >> View this message in context: returning Array from a web
> service
> >> >> method
> >> >>
> >>
> >
>
<http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449>
> >> >> Sent from the Axis - User
> >> >> <http://www.nabble.com/Axis---User-f232.html> mailing list
> archive
> >> at
> >> >> Nabble.com.
> >> >
> >> >
> >> > --
> >> > Thanks,
> >> > Deepal
> >> > ................................................................
> >> > "The highest tower is built one brick at a time"
> >> >
> >> >
> >> >
> >> >
> >>
> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> >
>
http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646652
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Now that's room service! Choose from over 150,000 hotels
> > in 45,000 destinations on Yahoo! Travel to find your fit.
> > http://farechase.yahoo.com/promo-generic-14795097
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> http://www.nabble.com/file/5942/TestService.java TestService.java
> http://www.nabble.com/file/5943/TestStub.java TestStub.java
> http://www.nabble.com/file/5944/TestClient.java TestClient.java
> http://www.nabble.com/file/5945/UserInfo.java UserInfo.java
> http://www.nabble.com/file/5946/UserInfoImpl.java UserInfoImpl.java
> --
> View this message in context:
>
http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8651318
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: returning Array from a web service method
Posted by rajac <ra...@gmail.com>.
Hi Kinichiro Inoguchi,
I am returning the array which is of non Java Bean type and when
I am trying to invoke the service I am not getting the value of array (i.e,
Object[] response = serviceClient.invokeBlocking(opGetAddress,
opGetAddressesArgs, returnTypes)). Although the length of the response is
returning "1" but the when I am trying to get/retrieve the value from the
response object its returning 'null'. I am not very sure if I am doing any
mistake. Do I need to configure anything to get array value of Non Java Bean
type?
I am uploading the java files.
Kinichiro Inoguchi wrote:
>
> Hi,
>
> If your "CustomJavaObject" is JavaBean,
> I think you can return array of "CustomJavaObject",
> and your service class below is right.
>
> --- rajac <ra...@gmail.com> wrote:
>
>>
>> But it simply returning a Java Bean. But my purpose is to return an
>> array of
>> java objects.
>>
>> like :
>> public CustomJavaObject[] getArray((){
>> // set the CustomJavaObject[]
>> // return CustomJavaObject[]
>> }
>>
>>
>> Regards,
>> Raja
>>
>>
>> Deepal Jayasinghe wrote:
>> >
>> > Hi rajac ;
>> >
>> >> Hi, I am new to axis2-1.1. Currently I am trying to create a web
>> >> service that returns an array of Java custom Objects.
>> >
>> > You mean Java Bean ?
>> > If so please have a look at Samples in Axis2 bistro
>> >
>> > Thanks
>> > Deepal
>> >
>> >> I could not able to find sample code from samples comes along with
>> the
>> >> axis2 distribution for this purpose. Can anybody help me sending
>> some
>> >> sample code for the same. I am using RPCServiceClient to get the
>> >> result frm the web service. Thanks. Raja Chattopadhyay
>> >>
>>
> ------------------------------------------------------------------------
>> >> View this message in context: returning Array from a web service
>> >> method
>> >>
>>
> <http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449>
>> >> Sent from the Axis - User
>> >> <http://www.nabble.com/Axis---User-f232.html> mailing list archive
>> at
>> >> Nabble.com.
>> >
>> >
>> > --
>> > Thanks,
>> > Deepal
>> > ................................................................
>> > "The highest tower is built one brick at a time"
>> >
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>>
> http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646652
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
>
>
> ____________________________________________________________________________________
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
http://www.nabble.com/file/5942/TestService.java TestService.java
http://www.nabble.com/file/5943/TestStub.java TestStub.java
http://www.nabble.com/file/5944/TestClient.java TestClient.java
http://www.nabble.com/file/5945/UserInfo.java UserInfo.java
http://www.nabble.com/file/5946/UserInfoImpl.java UserInfoImpl.java
--
View this message in context: http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8651318
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: returning Array from a web service method
Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi,
If your "CustomJavaObject" is JavaBean,
I think you can return array of "CustomJavaObject",
and your service class below is right.
--- rajac <ra...@gmail.com> wrote:
>
> But it simply returning a Java Bean. But my purpose is to return an
> array of
> java objects.
>
> like :
> public CustomJavaObject[] getArray((){
> // set the CustomJavaObject[]
> // return CustomJavaObject[]
> }
>
>
> Regards,
> Raja
>
>
> Deepal Jayasinghe wrote:
> >
> > Hi rajac ;
> >
> >> Hi, I am new to axis2-1.1. Currently I am trying to create a web
> >> service that returns an array of Java custom Objects.
> >
> > You mean Java Bean ?
> > If so please have a look at Samples in Axis2 bistro
> >
> > Thanks
> > Deepal
> >
> >> I could not able to find sample code from samples comes along with
> the
> >> axis2 distribution for this purpose. Can anybody help me sending
> some
> >> sample code for the same. I am using RPCServiceClient to get the
> >> result frm the web service. Thanks. Raja Chattopadhyay
> >>
>
------------------------------------------------------------------------
> >> View this message in context: returning Array from a web service
> >> method
> >>
>
<http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449>
> >> Sent from the Axis - User
> >> <http://www.nabble.com/Axis---User-f232.html> mailing list archive
> at
> >> Nabble.com.
> >
> >
> > --
> > Thanks,
> > Deepal
> > ................................................................
> > "The highest tower is built one brick at a time"
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646652
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: returning Array from a web service method
Posted by rajac <ra...@gmail.com>.
But it simply returning a Java Bean. But my purpose is to return an array of
java objects.
like :
public CustomJavaObject[] getArray((){
// set the CustomJavaObject[]
// return CustomJavaObject[]
}
Regards,
Raja
Deepal Jayasinghe wrote:
>
> Hi rajac ;
>
>> Hi, I am new to axis2-1.1. Currently I am trying to create a web
>> service that returns an array of Java custom Objects.
>
> You mean Java Bean ?
> If so please have a look at Samples in Axis2 bistro
>
> Thanks
> Deepal
>
>> I could not able to find sample code from samples comes along with the
>> axis2 distribution for this purpose. Can anybody help me sending some
>> sample code for the same. I am using RPCServiceClient to get the
>> result frm the web service. Thanks. Raja Chattopadhyay
>> ------------------------------------------------------------------------
>> View this message in context: returning Array from a web service
>> method
>> <http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449>
>> Sent from the Axis - User
>> <http://www.nabble.com/Axis---User-f232.html> mailing list archive at
>> Nabble.com.
>
>
> --
> Thanks,
> Deepal
> ................................................................
> "The highest tower is built one brick at a time"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646652
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: returning Array from a web service method
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi rajac ;
> Hi, I am new to axis2-1.1. Currently I am trying to create a web
> service that returns an array of Java custom Objects.
You mean Java Bean ?
If so please have a look at Samples in Axis2 bistro
Thanks
Deepal
> I could not able to find sample code from samples comes along with the
> axis2 distribution for this purpose. Can anybody help me sending some
> sample code for the same. I am using RPCServiceClient to get the
> result frm the web service. Thanks. Raja Chattopadhyay
> ------------------------------------------------------------------------
> View this message in context: returning Array from a web service
> method
> <http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449>
> Sent from the Axis - User
> <http://www.nabble.com/Axis---User-f232.html> mailing list archive at
> Nabble.com.
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: returning Array from a web service method
Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Hi,
Did you check POJO sample ?
--- rajac <ra...@gmail.com> wrote:
>
> Hi,
> I am new to axis2-1.1. Currently I am trying to create a web
> service that
> returns an array of Java custom Objects. I could not able to find
> sample
> code from samples comes along with the axis2 distribution for this
> purpose.
> Can anybody help me sending some sample code for the same. I am using
> RPCServiceClient to get the result frm the web service.
>
> Thanks.
>
> Raja Chattopadhyay
> --
> View this message in context:
>
http://www.nabble.com/returning-Array-from-a-web-service-method-tf3120863.html#a8646449
> Sent from the Axis - User mailing list archive at Nabble.com.
>
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org