Webservices in Java - how to create custom serializer/deserializerusing axis

P

pramodr

Hi group,

I am relatively new to webservices as a developer, could not get a
reply from other related forums. So I am posting my question here.

How do I write a custom serializer/deserializer in Java to be used in
a client program. My server runs Tomcat 5.5 using Apache Axis as
webservices engine. I created a bean class - Orders and invoked
successfully its services as follows


String endpoint = "http://localhost:5583/TomcatWS/services/
OrderService";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName("setOrder");


QName param = new QName("http://webservice.test");
call.setReturnType(param);


Orders order = new Orders();
order.setOrderNumber("12346789");
order.setOrderId(456000);


call.registerTypeMapping(Orders.class, param, new
BeanSerializerFactory
( Orders.class, param ), new BeanDeserializerFactory( Orders.class,
param ));;
new OrderListDeserializer( Orders.class, param ));


call.addParameter( "order", param, ParameterMode.IN );
call.invoke(new Object[] {order});


I generated the service wsdl and wsdd using Eclipse's wizard . Now I
would like to experiment with a new serializer. Can anybody guide me
on what are the steps involved.


Thanks for all the help


regards
Pramod R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top