dcsimg
What kind of serializers and de-serializers are needed?
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andy_Sun
Posted On:   Thursday, July 25, 2002 06:58 AM

In SOAP examples, there is such a reference "Make sure that there are serializers registered for all parameters which you will be sending, and deserializers for all information which you will be receiving back.".

What kind of serializers/de-ser are needed? Are these availible in the SOAP package that just need to be called or am I supposed to write my own serializers/de-ser?

Thanks.

Re: What kind of serializers and de-serializers are needed?

Posted By:   Laurent_Mihalkovic  
Posted On:   Saturday, August 10, 2002 01:18 AM

Apache AXIS also comes with the Bean serializer/deserializer that will take care of complex structures by mapping them to Java Beans.

Re: What kind of serializers and de-serializers are needed?

Posted By:   Laurent_Mihalkovic  
Posted On:   Saturday, August 10, 2002 01:16 AM

To add to the list published, writting a serializer/deserializer is actually very simple, and Apache AXIS comes with a couple samples, in case the Bean serializer would not be enough. I recently wrote my own to be able to send a complete DOM tree as a parameter to SOAP methods. It was done in less then 20 lines of code.

cheers,

laurent

Re: What kind of serializers and de-serializers are needed?

Posted By:   Rutvik_Doshi  
Posted On:   Tuesday, August 6, 2002 08:12 AM

If you are using Apache SOAP then serializer/deserializers are already written for the following types :



  • most Java primitive types, such as int, float, boolean, byte, etc. and their corresponding wrapper classes (i.e. java.lang.Integer, java.lang.Boolean, etc.)
  • Java arrays
  • java.lang.String
  • java.util.Date
  • java.util.GregorianCalendar
  • java.util.Vector
  • java.util.Hashtable
  • java.util.Map (under Java editions in which this is supported)
  • java.math.BigDecimal
  • javax.mail.internet.MimeBodyPart
  • java.io.InputStream
  • javax.activation.DataSource
  • javax.activation.DataHandler
  • org.apache.soap.util.xml.QName
  • org.apache.soap.rpc.Parameter
  • java.lang.Object (a deserializer for null objects only)


You will have to write your own serializer/deserializer for custom objects. Looking at the source code for the predefined ones will probably provide you with the best guidance. They need to implement org.apache.soap.util.xml.Serializer and org.apache.soap.util.xml.Deserializer respectively

About | Sitemap | Contact