axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bartek" <bar...@consol.pl>
Subject lame serialization problem
Date Wed, 06 Oct 2004 14:22:40 GMT
Hi 
I have a following serialization problem. It affects the serializing of arrays. If I serialize
in my serializator (for class named MyClass) an array, assume "String[] keys" with help of
context.serialize(keys) , I get in produced soap xml something like that:

<keys ...>
    <item .../>
    <item .../>
    <item .../>
</keys>

In the service wsdl file I declare the schema for that array as :

 <complexType name="MyClass">
                <sequence>
                    <element name="keys" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
 </complexType> 

where MyClass contains mentioned  array (keys). If I generate then with help of wsdl2java
the client side object model for that wsdl I get corresponding class MyClass , containg also
the array - "String[] keys", of course. 
But the problem is that if I invoke any method of my web service and pass as a parameter the
instance of MyClass (generated by wsdl2java) I get in outgoing soap xml:

<keys .../>
<keys .../>
<keys .../>
<keys .../>

instead of (like in incomming soap xml):

<keys ...>
    <item .../>
    <item .../>
    <item .../>
</keys> 

Why does this difference exist? It is quite funny because dot net client object model (generated
from wsdl) generates as soap xml the one with structure as above, but axis client not :| .

Regards bartek
Mime
View raw message