users@jax-rpc.java.net

Re: Serialization/Deserialization doubts for Encapsulated Complex Types

From: kathy walsh <Kathleen.Walsh_at_Sun.COM>
Date: Fri, 23 Jul 2004 10:50:23 -0400

Dynamic Proxy implementation for JAXRPC 2.0 will
hopefully eliminate the problems-

If you go through the web services forum on java.sun.com-
you will see Doug k's response to using the
serializers generated by static stubs-
Kathy

Narinder Kumar wrote:

> 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(ObjectSerializerBase.java
>>> :113)
>>> at
>>> com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serializeInstance(Referencea
>>> bleSerializerImpl.java:194)
>>> at
>>> com.sun.xml.rpc.encoding.SOAPSerializationContext.serializeMultiRefObjects(SOAPSe
>>> rializationContext.java:94)
>>> at
>>> com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:477)
>>> at
>>> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:59)
>>> at
>>> com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
>>> at
>>> com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:353)
>>> at
>>> com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.jav
>>> a:99)
>>> at
>>> com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.jav
>>> a:71)
>>> at $Proxy0.order(Unknown Source)
>>> at FogWSDynClient.main(FogWSDynClient.java:154)
>>>
>>> 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;
>>>
>>> cRequest.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 :
>
>>>
>>> 3 If a user defined type must implement java.io.Serializable
>>> 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 ?
>>
> Regards
> Narinder
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net For
> additional commands, e-mail: users-help_at_jax-rpc.dev.java.net