Could this be related to AXIS generating an invalid WSDL for
DOCUMENT/LITERAL services?

It is correct that DOCUMENT/LITERAL does not send type info
over the wire with each call because the client should already have
the type information from the WSDL.

Brit Ziemendorf wrote:
Hi all,

I implemented a small document /literal Web service sending and receiving complex objects.
The XML Schema looks like listed below.
As can be seen a "UserGroup" consists of some String elements and a Hashtable that itself contains "User" objects.


The Problem:
When the client sends a UserGroup object the contained Hashtable can not be deserialized properly. When I debug it, it looks as if Axis can not find the correct Deserializer and uses a SimpleDeserializer as default. The SimpleDeserializer throws an exception because simple values are not supposed to have child elements.


However, when the server sends a UserGroup object back to the client, the result is nearly the same. It seems that the client expects a Hashtable and therefore uses the MapDeserializer, but the included ItemDeserializer is not able to find the correct Deserializer for the items value, a "User" object. Again a SimpleDeserializer is used as default and throws an exception.

When debugging it seems that in both cases the SimpleDeserializer is choosen because there are no type information available.
How can this be? Is it normal for a document/literal service that no type information is sent over the wire?
When I implement the same service as RPC/encoded it works fine.
Is there anything that I can do, so that Axis gets the correct Deserializer? (Both objects are already registered in the TypeMapping!)


HELP!!

_____________________________________________________________________________________

<schema xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://bookstore.universal";>
<complexType name="User">
<sequence>
<element name="age" type="xsd:int"/>
<element name="name" nillable="true" type="xsd:string"/>
<element name="profession" nillable="true" type="xsd:string"/>
<element name="userID" nillable="true" type="xsd:string"/>
<element name="marks" nillable="true" type="impl:ArrayOf_xsd_float"/>
</sequence>
</complexType>
<complexType name="UserGroup">
<sequence>
<element name="groupID" type="xsd:string"/>
<element name="groupName" nillable="true" type="xsd:string"/>
<element name="groupUsers" nillable="true" type="apachesoap:Map"/>
</sequence>
</complexType>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://xml.apache.org/xml-soap";>
<complexType name="mapItem">
<sequence>
<element name="key" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="tns2:User"/>
</sequence>
</complexType>
<complexType name="Map">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded" type="apachesoap:mapItem"/>
</sequence>
</complexType>
</schema>
___________________________________________________________________________________________



Thanks, Brit





Reply via email to