axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <>
Subject [jira] Resolved: (AXIS-1778) Array deserialization "broken" for document/literal mode
Date Sun, 01 May 2005 22:14:04 GMT
     [ ]
Davanum Srinivas resolved AXIS-1778:

    Resolution: Cannot Reproduce

please start with a WSDL and generate the server-side impl for Axis. this should work. Please
upload your wsdl if it does not.


> Array deserialization "broken" for document/literal mode
> --------------------------------------------------------
>          Key: AXIS-1778
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly)
>     Reporter: Bill Keese

> My .NET client
> correctly serializes
> class MyClass{
>    String[] myArray;
> }
> as
> <MyClass>
>   <myArray>
>      <item>one</item>
>      <item>two</item>
>   </myArray>
> </MyClass>
> However, AXIS cannot deserialize this.  Note that if I use RPC encoding then the type
information is stored in the serialized data and Axis can decode it fine.
> The workaround is to register a serializer/deserializer in the
> WSDD file like this:
> <typeMapping
> languageSpecificType="java:java.lang.String[]"
> qname="soapEncoding:Array"
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> encodingStyle=""
> />
> where
> xmlns:soapEncoding="".
> (Of course, you should substitute String[] with the actual type of your
> array.)
> Is this a bug? I'd like all Array objects to automatically call
> ArraySerializer/ArrayDeserializer.
> Note also that there is a default serializer/deserializer registered for
> ArrayList (although not for List or Collection). However, in
> document/literal mode (where no type information is encoded into the
> message), Axis has no way of knowing the type (String, Integer, etc.) so
> the deserialization fails when processing the first element. Thus your Java
> class should contain a simple array like this:
> String[] foo;
> instead of a list like this:
> List foo;
> Note that the name of the array (myArray) is NOT listed in the typeMapping above.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message