axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Leelarathne" <muthu...@vijayaba.cse.mrt.ac.lk>
Subject Re: Complex Type Deserialization
Date Fri, 01 Aug 2003 04:05:13 GMT
Jeff,

Axis has a problem for deserializing arrays inside custom data types. Acutally it is listed
under bug list in axis. The number of the bug is 15384. 

But axis is capable of deserializing arrays. So a possible workaround would be dynamically
registering the array deserialiser for your array to the type mapping registry. I haven't
tried it but theoritically it looks fine.

>From the example-5 in the user guide.

call.registerTypeMapping(Order.class, qn,
                      new org.apache.axis.encoding.ser.BeanSerializerFactory(Order.class,
qn),        
                      new org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class,
qn));        

Likewise register new org.apache.axis.encoding.ser.ArrayDeserializer

Dimuthu.



----- Original Message ----- 
From: "Jeff Poetker" <jeff.poetker@medplus.com>
To: <axis-user@ws.apache.org>
Sent: Friday, August 01, 2003 1:22 AM
Subject: Complex Type Deserialization


I'm having some trouble deserializing a complex type which contains an
array of Strings. 

Currently I have a webservice running on weblogic server, and I'm trying
to verify that it works well with webservice toolkits other than that
supplied by BEA. So far I know the service works fine with .NET and with
BEA's tools. But with Axis and Sun's JWSDP I'm unable to desirialize my
responses.

With Axis I get the following message:
SimpleDeserializer encountered a child element, which is NOT expected,
in something it was trying to deserialize.

And stacktrace:
at
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeser
ializer.java:189)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2272)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
org.tempuri.ResultsServicePortStub.getResults(ResultsServicePortStub.jav
a:276)
at AxisTestClient.run(AxisTestClient.java:102)
at AxisTestClient.main(AxisTestClient.java:67)

Searching the archives of this list, I see some similar posts, but I'm
not seeing any answers. Have a left out something so obvious that people
haven't posted it to the list? Or is there a larger problem here?

Any suggestions?

It may be worth noting that when my array of strings is null, I don't
get this exception, and the object is deserialized just fine.

Thanks,
Jeff Poetker



Mime
View raw message