On Fri, Aug 15, 2003 at 01:26:12PM +0200, Michael Konietzka wrote:
> Hi,
> i am regarding problems with deserialization to a HashMap within an AXIS
> Client. Server is a PHP-SOAP-Service, self developed from someone else.
[..]
> What is wrong?
> Maybe someone can provide some XML of a SOAP-Response, which works with
> MapDeserializer.

Ok, I created a webservices with MapSerializer to see the generated
Axis-Response when dealing with HashMaps:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <getUserFromSessionResponse 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
   <getUserFromSessionReturn 
xsi:type="ns1:de.schlund.webservices.methadon.MethadonLoginReturnValue" 
xmlns:ns1="http://xp-framework.net/xmlns/xp";>
    <status xsi:type="xsd:string">OK</status>
    <user xsi:type="ns1:de.schlund.webservices.methadon.MethadonLoginUser">
     <department xsi:type="xsd:anyType" xsi:nil="true"/>
     <email xsi:type="xsd:string">[EMAIL PROTECTED]</email>
     <fullname xsi:type="xsd:string">Michael Konietzka</fullname>
     <permissions xsi:type="xsd:anyType" xsi:nil="true"/>
     <phone xsi:type="xsd:string" xsi:nil="true"/>
     <properties xsi:type="ns2:Map" xmlns:ns2="http://xml.apache.org/xml-soap";>
      <item xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
       <key xsi:type="xsd:string">vermittler_id</key>
       <value xsi:type="xsd:string">123456</value>
      </item>
     </properties>
    </user>
   </getUserFromSessionReturn>
  </getUserFromSessionResponse>
 </soapenv:Body>
</soapenv:Envelope>
 
Well, it MapDeserializer expects "item"-Elements and "key/value"-Elements.

In Apache SOAP-CVS there is a PropertyBagSerializer.java:
"Add a serializer (PropertyBagSerializer) that can read SOAP compound
types into a Hashtable where the element names are the keys and the
element contents are the values, which means beans do not have to be created
for each compound type being deserialized.  Conversely, it can write a
Map similary, providing an alternative to the default Apache SOAP
serialization of Maps."

What about to add this to Apache Axis?

Best regards 
 Michael
 
-- 
Dipl.-Inform. Michael Konietzka  Schlund + Partner AG
- Development UNIX -             Brauerstra�e 48 
    Webservices                  D-76135 Karlsuhe
http://www.schlund.de/           Germany

Reply via email to