dcsimg
Pass in a VO - user's defined object- and return an VO
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   chung_vu
Posted On:   Tuesday, August 10, 2004 01:32 PM

Please help,


Suppose I have a person obj I want to pass it in webservice (axis) and the service will return it to me as an person obj. How do you do that?
In the Client code For String return type, I do:
// setup for the Call object here ....
....
call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
But for the Object like person object how can I do?
I dont see any thing for object in
org.apache.axis.encoding.Constants
Thanks

Re: Pass in a VO - user's defined object- and return an VO

Posted By:   Vinay_Sarwate  
Posted On:   Sunday, August 29, 2004 10:35 PM

Off course you can paas & receive Custom Objects but we have to tell AXIS how to handler them by registering them in following way, assuming you know its qualified name defined in wsdd etc. -


QName qname = new QName("PersonDetail","Person");

call.registerTypeMapping(your_package.Person,qname, org.spache.axis.encoding.ser.BeanSerializerFactory.class, org.spache.axis.encoding.ser.BeanDeserializerFactory.class);

call.setReturnType(qname);

.....


Hope this helps.



Vinay
About | Sitemap | Contact