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 David Kocher <da...@itserve.ch> on 2003/07/30 15:22:35 UTC

Using BeanSerializer

Hi,
	If anyone could give me a quick howto on how to use the 
org.apache.axis.encoding.ser.BeanSerializer class to marshall a java instane 
to an xml file I would appreciate.

Thanks for any hints
- David

Re: Using BeanSerializer

Posted by List Man <li...@ekstrom.org>.
If you mean you want to use the built in BeanSerializer on the client side 
then all you have to do is register the bean in the call with a serializer 
and push it down.  Eg:

Call = Service.getCall();
Call.setTargetEndPoint("http://middle.of.nowhere/service");

//Begin what I think you want to know
String nameSpace = "http://my.space";
QName poqn = new QName(nameSpace,"Foo");
Class cls = Foo.class;
Call.registerTypeMapping(cls,pown,BeanSerializerFactory.class,BeanDesrializerFactory.class);
//End what I think you want to know

Response = Call.invoke("MyMethod",(Object [])MyParameters.toArray());


On Wednesday 30 July 2003 07:22 am, David Kocher wrote:
> Hi,
> 	If anyone could give me a quick howto on how to use the
> org.apache.axis.encoding.ser.BeanSerializer class to marshall a java
> instane to an xml file I would appreciate.
>
> Thanks for any hints
> - David