Hi all, I am looking for a guide to tell me how to write serializers/deserializers for my complex java object. My class is too complex to be a JavaBean, so the BeanSerializer will not help me. I know org.apache.axis.encoding is the package to look at, but I am confused with all the interfaces and baseclasses that are offered there. Even looking at the sourcecode of the objects in org.apache.axis.encoding.ser didn't shed light on it... The documentation from AXIS on creating serializers/deserializers isn't much of a help... Anyone got some more info?? Thnx in advance
You bassicaly don't need to write your own serializer. But jast specify a mapping between the java class and WSDL element in the *.wsdd file. If you need an example write me email I will send it to your. The little example is Be carefull about the namespace. It should be the same like you use in the WSDL document <typeMapping xmlns:ns = "presentation.server.mpas.company.com" qname = "ns acket" type = "java:com.company.mpas.server.presentation.Packet" serializer = "org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer = "org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/" />
Good luck for yourself.
posted 14 years ago
The problem with this class is that it't not a javabean-compatible class, and I can't do anything about that. Having the BeanSerializer here is not an option. The type mapping as I have it is like this:
This works so far, since I can actually generate output with the Serializer. There is a new problem on the horizon: adding SOAPHeaders during serializing does NOT generate the desired headers, but also no exceptions are thrown.... This puzzles me... Anyone added headers during serialization?
Hi, by looking at the name of the Serializer Factories, it looks like you are parsing some String and trying to create a SOAP Message. could you not as well create a Bean that will cater to the requirements. any way, you must be knowing the need to create your own (De)serializers. but did you consider extending the extending the BeanSerializer / Deserializer Factories and creating the Serializer / Deserializer extending the Bean Serializers and the Deserializers in the encoding.ser Package of axis? I dont know but it could also mean that your Serializers be qualified in the same package structure. I dont know if this would do any bit to solve the problem, but I think it would be worth a try. [ April 15, 2004: Message edited by: RajaniKanth Bhargava ]
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
Download Free Java APIs to Work with Office Files and PDF