users@jax-rpc.java.net

Re: Collection classes and interoperability

From: Rahul Sharma <Rahul.Sharma_at_sun.com>
Date: Tue, 16 Jul 2002 07:11:02 -0700

Peter C. Tribble wrote:
> In JAX-RPC 1.0, it is claimed that the Collection classes are supported -
> for example Vector and Hashtable.

   Yes. JAX-RPC 1.0 RI supports a subset of Java collection classes.

> How complete is this support? In particular, can I call a service that
> uses SOAP::LITE or Apache Soap that returns a Collection?

   So far, there has been no interop testing for collection classes in
   the SOAPBuilders community. Each implementation uses its own XML
   mapping of Collection classes. There is a plan to do some interop
   testing for HashMap and Vector in Round V of SOAPBuilders interop
   testing.

   The lack of standard XML representation for collection classes
   across SOAP implementations is the reason for lack of interop
   today.

> The reason I ask is that when I try this I get deserialization errors.
> It's fine when I return a simple type (so I haven't completely messed
> up), and it's fine when I use Apache Soap or Apache Axis on the client,
> but I've had no luck so far with a JAX-RPC DII client.

   Do you mean Apache/Axis with Apache/Axis? Yes, this should work
   for collection classes because this is across the same product.
   The same way JAX-RPC to JAX-RPC RI will work for collection classes.
   Issue is around the interoperability.

   Regards,

   Rahul

> I've attached the errors in case they mean anything to someone.
>
> -Peter Tribble
> HGMP Computing Services
> http://www.hgmp.mrc.ac.uk/~ptribble/
>
>
> ------------------------------------------------------------------------
>
> Against SOAP::LITE
>
> EmbreoPublicJaxRpcRequest: Caught Exception (Runtime exception; nested exception is:
> deserialization error: unexpected XML reader state. expected: END but found: START: s-gensym5)
> java.rmi.RemoteException: Runtime exception; nested exception is:
> deserialization error: unexpected XML reader state. expected: END but found: START: s-gensym5
> deserialization error: unexpected XML reader state. expected: END but found: START: s-gensym5
> at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:200)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:147)
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:164)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
> at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
> at uk.ac.mrc.hgmp.embreo.jax_rpc.EmbreoPublicJaxRpcRequest.<init>(EmbreoPublicJaxRpcRequest.java:171)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:128)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:69)
> at uk.ac.mrc.hgmp.embreo.EmbreoAppList.<init>(EmbreoAppList.java:62)
> at EmbreoClient.<init>(EmbreoClient.java:123)
> at EmbreoClient.main(EmbreoClient.java:1274)
>
> CAUSE:
>
> unexpected XML reader state. expected: END but found: START: s-gensym5
> at com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java:49)
> at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:164)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:147)
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:164)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
> at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
> at uk.ac.mrc.hgmp.embreo.jax_rpc.EmbreoPublicJaxRpcRequest.<init>(EmbreoPublicJaxRpcRequest.java:171)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:128)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:69)
> at uk.ac.mrc.hgmp.embreo.EmbreoAppList.<init>(EmbreoAppList.java:62)
> at EmbreoClient.<init>(EmbreoClient.java:123)
> at EmbreoClient.main(EmbreoClient.java:1274)
> EmbreoPublicJaxRpcRequest: Failed.
>
> ===========================================================================
> Same again, against Apache SOAP 2.2
>
> EmbreoPublicJaxRpcRequest: Caught Exception (Runtime exception; nested exception is:
> deserialization error: unexpected XML reader state. expected: END but found: START: item)
> java.rmi.RemoteException: Runtime exception; nested exception is:
> deserialization error: unexpected XML reader state. expected: END but found: START: item
> deserialization error: unexpected XML reader state. expected: END but found: START: item
> at com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(SimpleTypeSerializer.java:140)
> at com.sun.xml.rpc.encoding.AttachmentSerializer.deserialize(AttachmentSerializer.java:184)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.doDeserialize(SOAPResponseSerializer.java:107)
> at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:163)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:147)
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:164)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
> at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
> at uk.ac.mrc.hgmp.embreo.jax_rpc.EmbreoPublicJaxRpcRequest.<init>(EmbreoPublicJaxRpcRequest.java:171)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:128)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:69)
> at uk.ac.mrc.hgmp.embreo.EmbreoAppList.<init>(EmbreoAppList.java:62)
> at EmbreoClient.<init>(EmbreoClient.java:123)
> at EmbreoClient.main(EmbreoClient.java:1274)
>
> CAUSE:
>
> unexpected XML reader state. expected: END but found: START: item
> at com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java:49)
> at com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(SimpleTypeSerializer.java:132)
> at com.sun.xml.rpc.encoding.AttachmentSerializer.deserialize(AttachmentSerializer.java:184)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.doDeserialize(SOAPResponseSerializer.java:107)
> at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:163)
> at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:115)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:147)
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:164)
> at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:54)
> at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
> at uk.ac.mrc.hgmp.embreo.jax_rpc.EmbreoPublicJaxRpcRequest.<init>(EmbreoPublicJaxRpcRequest.java:171)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:128)
> at uk.ac.mrc.hgmp.embreo.EmbreoPublicRequest.<init>(EmbreoPublicRequest.java:69)
> at uk.ac.mrc.hgmp.embreo.EmbreoAppList.<init>(EmbreoAppList.java:62)
> at EmbreoClient.<init>(EmbreoClient.java:123)
> at EmbreoClient.main(EmbreoClient.java:1274)
> EmbreoPublicJaxRpcRequest: Failed.