Hi, I was trying to figure out the same thing and posted a question on the user-list. See "Specify JAXB generated complex types to Axis web service". However, I think I did not get my questions across properly, although ppl were kind enuff to respond. Anyways, here's what I figured out so far.. maybe it'll help ya. I am going to assume that you have the classes and ObjectFactory generated from XSD using JAXB and that you are using Axis 1.4.
1. Create a custom Serializer for each custom object. Write a wrapper around the ObjectFactory which implements a> org.apache.axis.encoding.Serializer interface b> javax.xml.rpc.encoding.Serializer c> java.io.Serializable interface. I looked up the org.apache.axis.encoding.ser.BeanSerializer API. 2. Create a custom Desrializer for each custom object. Write a wrapper around the ObjectFactory which implements a> org.apache.axis.encoding.Callback b> org.xml.sax.ContentHandler c> org.apache.axis.encoding.Deserializer d> javax.xml.rpc.encoding.Deserializer e> org.xml.sax.DTDHandler f> org.xml.sax.EntityResolver g> org.xml.sax.ErrorHandler h> java.io.Serializable I looked up the org.apache.axis.encoding.ser.BeanDeserializer API. The general approach seems to be to create a DeserializerFactory, although I am not sure why. 3. In the WSDD specify your custom serializer/deserializer for each custom object <typeMapping qname="ns:local" xmlns:ns="someNamespace" languageSpecificType="java:my.java.CustomObject" serializer="my.java.CustomSerializer" deserializer="my.java.CustomDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 4. After deploying the service with these specs, Axis should be able to call your custom Serializer/Deserializer as needed. Warning: I havent tested out these steps yet, just seemed logical to me, except for the large amount of work seemingly involved in getting a complex object across. If you or anyone else knows/feels it is wrong, please post on the user-list. Regards, Tim
