users@jax-rpc.java.net

Re: non-built-in/value data types and serialization/deserialzatio n problems

From: Arun Gupta <arun.gupta_at_sun.com>
Date: Fri, 06 Sep 2002 15:04:34 -0700

Hi Raghu,

Section 5.4 of the spec says "Java class for a JAX-RPC value type may be
designed as a JavaBeans class." Thus JavaBean is not the only design
pattern supported. You can have classes with JavaBean style
getters/setters and public fields in the same value type and that will
work. This can also be derived from section 5.4.2 where it talks about
the serialization semantics of a value type.

Thanks for your interest in JAX-RPC.

Regards,
-Arun

Havaldar, Raghu wrote:

>I found out that a value-type needs to be a Java-Bean to be transmitted
>across the
>wire (as per the 1.0.1 JAXRPC-RI). Does this reflect the JAX-RPC spec
>Section 5.4 ?
>
>>From my understanding, a value-type can be a non-bean with its properties
>defined to be public (which is what I had implemented, and the RI failed to
>deserialize).
>
>Does anybody have experiences w/ non-JavaBean value-types ?
>
>thanks,
>raghu
>
>> -----Original Message-----
>>From: Havaldar, Raghu
>>Sent: Friday, September 06, 2002 4:02 PM
>>To: 'JAXRPC-INTEREST_at_JAVA.SUN.COM'
>>Subject: non-built-in/value data types and
>>serialization/deserialzation problems
>>
>>Hi,
>>
>>Environment:
>>- JAX-RPC RI 1.0.1
>>- Win2K
>>- JDK 1.3.1
>>
>>I have defined a bunch of non-built-in/value types as per Section 5.4 of
>>the JAX-RPC spec. Each of them has a public no-arg constructor, and
>>have all the variables defined to be public.
>>
>>When I try to use DII in a client and invoke the service, I get the
>>following error:
>>
>> [java] java.rmi.ServerException: Internal Server Error
>>(deserialization error: unexpected XML reader state. expected: END but
>>found: START: esn)
>> [java] at
>>com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:35
>>7)
>> [java] at
>>com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
>> [java] at
>>com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:5
>>4)
>> [java] at
>>com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:279)
>> [java] at
>>com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHand
>>ler.java:96)
>> [java] at
>>com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHand
>>ler.java:68)
>> [java] at $Proxy0.invoke(Unknown Source)
>> [java] at com.onstar.vehcomm.client.LockUnlockClient.main(Unknown
>>Source)
>>
>>Is this some kind of serialization/deserialization error or some internal
>>bug ? I have seen a similar problem
>>being reported on BugParade - # 4736947.
>>
>>
>>
>>thanks,
>>raghu
>>
>>
>>

--
=============================================
There is only one me, I must live myself!
There is only one today, I must live itself!
=============================================
http://members.tripod.com/~apgupta/index.html
=============================================