• Post Reply Bookmark Topic Watch Topic
  • New Topic

deserializer  RSS feed

 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have deployed a web service , methods of which return java objects(not primitives). I am using axis and I have the beanmapping entry in my deploy.wsdd

But when I invoke the method, I get the org.xml.sax.SAXException: Deserializing parameter 'getXYZMethodReturn': could not find deserializer for type {urn:myService}MyJavaObject.
I am sure I am missing some step here. and btw this object is a bean. And i understand from the axis documentation, that if my object is a bean, then I can rely on the default serialisation model of axis instead of writing my own serialisers/deserialisers. SO i have not done anything extra to handle myObject except providing an entry in deploy.wsdd as shown above....
Regards
.
[ November 21, 2003: Message edited by: shankar vembu ]
[ November 21, 2003: Message edited by: shankar vembu ]
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add to the above post.
I am getting the SOAP response and I see this using tcpmon utility. I guess i am missing something in the client side. It is unable to deserialise the received complex object.
regards.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shankar vembu:
Just to add to the above post.
I am getting the SOAP response and I see this using tcpmon utility. I guess i am missing something in the client side. It is unable to deserialise the received complex object.
regards.


You have to register the deserializer for your complex object on the client side.
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jean-Louis Marechaux:


You have to register the deserializer for your complex object on the client side.

could u elaborate on this. i just now created the client side java code from the WSDL using WSDL2Java tool and this generated all the complex objects. I guess these act as serialiser/deserialisers. And from my client, I import them and call my web-service. Even after this, I get the exception. Where do i register the deserialiser in my client side. I thought this is done only at the server-side.
regards
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serializer/Deserializer are used during marshalling/unmarshalling process.
When your web service send a response back to the consumer, the server needs a serializer. Once the response is received on the client side, you client now need a deserializer to be able to understand the response.
With Axis, the method registerTypeMapping() of the call object allows you to declare deserializers on the client side.
Check Axis Api doc for further information

If your complex object is a bean (according to Sun spec JavaBean), then you will be able to us the default bean deserializer Axis is bundled with : org.apache.axis.encoding.ser.BeanDeserializerFactory.class
But you also need to double check that all the datatypes you are using in your bean are supported by the default Axis deserializer

Otherwise, you'll have to declare and create your own deserializer
HTH,
[ November 21, 2003: Message edited by: Jean-Louis Marechaux ]
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx a lot for your reply. I have it running now. But i see that registering type mapping this way is not a part of the jax-rpc specification. But i think this is OK for me, my client may not be portable across soap engines, but for now I am satisfied with the results.
thanx,
shankar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!