Re: Serialization/Deserialization doubts for Encapsulated Complex Types

From: Narinder Kumar <>
Date: Fri, 23 Jul 2004 16:37:12 +0200
kathy walsh wrote on 23/07/2004, 16:20:

For Dynamic Proxy and DII client for javaBeans that have Complex types as fields- then very often you need to set custom serializers in the serializer registry- This itself will impact portability of dynamic clients. It is always best to use static stubs for your client due to this issue.
That means we can't implement a portable client i.e. Dynamic Proxy or DII in the case of encapsulated complex types. In my opinion this is a serious limitation of Jax-RPC.

If that is the situation at present, can you point me to an example or some sample code how can we use or specify Custom Serializers / Deserializers in such a scenario while using Static stub classes for client implementation (considering I am generating Stub classes from wscompile tool) I still have an unanswered question on the same subject (dated : 02 july, Sub : Communication problem between Apache-Axis WebService and JWSDP client)

serialization error: java.lang.IllegalArgumentException: object is not an instance of declaring class
serialization error: java.lang.IllegalArgumentException: object is not an instance of declaring class
        at com.sun.xml.rpc.encoding.ObjectSerializerBase.serialize(
        at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serializeInstance(Referencea
        at com.sun.xml.rpc.encoding.SOAPSerializationContext.serializeMultiRefObjects(SOAPSe
        at com.sun.xml.rpc.client.StreamingSender._writeRequest(
        at com.sun.xml.rpc.client.StreamingSender._send(
        at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(
        at com.sun.xml.rpc.client.dii.BasicCall.invoke(
        at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.jav
        at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.jav
        at $Proxy0.order(Unknown Source)
        at FogWSDynClient.main(

It is to be noted that the exception comes at the time when we make a call to the web service method i.e.

//Create and fill an Array of Address objects
Address[] testAddresses;

setAllAddresses(testAddresses); //No compilation or Runtime error

try {
 boolean response = wsProxy.complexOrder (cRequest); //Throws Exception
} catch (Exception exc)
Can someone give some ideas on the following issues :

   If a user defined type must implement interface as well even if it is implemented as JavaBean in order to be passed as parameter/return type successfully in a Web Service ?

Finally a WSDL related question, are there any differences in WSDL files generated for the same implementation by different tools example between ApacheAxis and JWSDP ? 

Are there any interoperability issues between WebService developed using Axis API and client developed using JWSDP ?
--------------------------------------------------------------------- To unsubscribe, e-mail: For additional commands, e-mail: