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 Nasreen Laghari <la...@hotmail.com> on 2007/10/06 08:13:02 UTC

OMElement: Reterieve Object from webservice

Hi All,
 
 
I'm trying to get Object from webservice.
Is there any way to put Class name instead of method name in OMElement?Or Does any 1 know how to get Object instead of text from webservice so that I can access all the properties of object.
I tried making simple webservice and client. I made 2 java classes in webservice name as "Trial" and "Student".I have created object of Trial class in Student. On client-side i'm calling method in which i have created object of Trial.
Please find the attached copy of webservice, both java files(inside the webservice) and client file.
Regards
Nasreen
_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us

Re: OMElement: Reterieve Object from webservice

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> Hi All,
>  
>  
> I'm trying to get Object from webservice.
> Is there any way to put Class name instead of method name in OMElement?
Im sorry I did not understand this part , can you please explain bit more.
> Or Does any 1 know how to get Object instead of text from webservice
> so that I can access all the properties of object.
> I tried making simple webservice and client. I made 2 java classes in
> webservice name as "Trial" and "Student".
> I have created object of Trial class in Student. On client-side i'm
> calling method in which i have created object of Trial.
> Please find the attached copy of webservice, both java files(inside
> the webservice) and client file.
So when you call the service what did happen ?

Thanks
Deepal



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: OMElement: Reterieve Object from webservice

Posted by Upul Godage <up...@gmail.com>.
Hi Nasreen,

You can use a data binding framework such as ADB to generate the code which
will do the OMElement to user defined object mapping automatically.  Then
you are not working with OMElement.
http://ws.apache.org/axis2/1_3/quickstartguide.html#clientadb

This is how you are doing it now.
http://ws.apache.org/axis2/1_3/quickstartguide.html#clientaxiom

If you are working with OMElement directly, then you can do something like
this to convert OMElement to Object.

        OMElement gerServiceResponse = client.sendReceive(payload);
        Trial t = (Trial)
org.apache.axis2.databinding.utils.BeanUtil.deserialize(Trial.class,
gerServiceResponse, new DefaultObjectSupplier(), null);

Hope this helps.

Upul


On 10/6/07, Nasreen Laghari <la...@hotmail.com> wrote:
>
> Hi All,
>
>
> I'm trying to get Object from webservice.
> Is there any way to put Class name instead of method name in OMElement?
> Or Does any 1 know how to get Object instead of text from webservice so
> that I can access all the properties of object.
> I tried making simple webservice and client. I made 2 java classes in
> webservice name as "Trial" and "Student".
> I have created object of Trial class in Student. On client-side i'm
> calling method in which i have created object of Trial.
> Please find the attached copy of webservice, both java files(inside the
> webservice) and client file.
>
> Regards
> Nasreen
>
>
> ------------------------------
> Peek-a-boo FREE Tricks & Treats for You! Get 'em!<http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>