Jeff,
 
Sorry for the incomplete solution I gave in the last mail. I realize my mistake when I think further. I think you might have to write a custom serialize and custom deserializer that uses the ArraySerializer and Deserializer and then register it to the type mapping registry.
 
Dimuthu.
 
 
----- Original Message -----
Sent: Friday, August 01, 2003 10:05 AM
Subject: Re: Complex Type Deserialization

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" <[EMAIL PROTECTED]>
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

Reply via email to