Re: How to create Serializer/Deserializer

From: Suresh Yellamaraju <>
Date: Thu, 27 Feb 2003 09:31:39 +0530

Apologies. My mistake at not making it explicit.

I am using DII approach, so I cannot use wscompile or other tools. I
parse the given WSDL & get the info about ComplexType into the
ArrayList. So, say the type is AComplexType. I put the name AComplexType
into ArrayList along with the <element> info. I do not have the class,

So should I write the serializer/deserializer?


Doug Kohlert wrote:

> Suresh, if the ComplextType is a supported JAXRPC value type, then no,
> you
> do not need to create your own serailizers, however you must specify all
> of the class names that will be stored in the array list in your
> config.xml
> file that you pass to wscompile. You do not need to specify classes that
> are used explicitly in your service endpoint interfaces since they will
> be discovered by the tool. Here is an example config.xml file.
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration
> xmlns="">
> <service name="Interface_Service"
> targetNamespace=""
> typeNamespace=""
> packageName="stub_tie_generator_test">
> <interface name="stub_tie_generator_test.Interface"
> servantName="stub_tie_generator_test.InterfaceImpl"/>
> <typeMappingRegistry>
> <additionalTypes>
> <class name="java.lang.String[]"/>
> <class name="stub_tie_generator_test.Foo"/>
> <class name="stub_tie_generator_test.MyRecord"/>
> </additionalTypes>
> </typeMappingRegistry>
> </service>
> </configuration>
> Suresh Y wrote:
>> I am using an ArrayList to map a ComplexType. So elements of
>> ComplexType map to elements of the ArrayList.
>> 1. Do I have to write a serializer/deserializer that will
>> marshall/unmarshall the data to/from the ArrayList?
>> 2. Where do I start for this? I am looking at the source code of
>> JAXRPC-RI. Are there any interfaces to implement or classes to extend
>> or existing classes to use for doing this?
>> 3. After I create these serializers or deserializers, I register
>> these for the corresponding ComplexTypes using the CombiedSerializer.
>> In doing this, I assume that I mention the QName of the ComplexType
>> irrespective of the Serializer/Deserializer class that provides? Am I
>> right?
>> Thanks in advance
>> Cheers
>> Suresh
> --
> Doug Kohlert
> Java Software Division
> Sun Microsystems, Inc.
> phone: 503 345-9806