Paul,
I will add the support in DefaultTypeMapping to serialize java.util.Map to
ns1:Map using the MapSerializer.
The DefaultTypeMapping will deserialize a ns1:Map to a java.util.HashMap
(can't deserialize to java.util.Map because its an interface).
Comments?
Rich Scheuerle
XML & Web Services Development
512-838-5115 (IBM TL 678-5115)
"Paul Mietz Egli"
<pegli@lightsurf. To: <[EMAIL PROTECTED]>
com> cc:
Subject: Re: serialization bug in
ArraySerializer (repost from axis-user)
01/31/2002 04:48
PM
Please respond to
axis-dev
I'm a couple days wiser now in the ways of type mapping in Axis,
so I thought I'd post the answer to my own question in case someone
else runs into the same problem.
Quick recap: my service class has functions which take as parameters
and return arrays of java.util.Map. Client calls to these functions
resulted in null pointer exceptions on the server in alpha-3 and nightly
builds between 1/26 and 1/30.
The solution: add the following to the service deployment descriptor:
<typeMapping
qname="ns1:Map"
xmlns:ns1="http://xml.apache.org/xml-soap"
languageSpecificType="java:java.util.Map"
serializer="org.apache.axis.encoding.ser.MapSerializerFactory"
deserialiser="org.apache.axis.encoding.ser.MapDeserializerFactory"
/>
Note that these factory packages will work with 1/30 builds or later;
if you're still using alpha-3, use "org.apache.axis.encoding".
I'm still of the opinion that I shouldn't need to specify the serializer
for Map when Hashtable and HashMap are intriniscally supported. This
is more of a quibble than a serious problem, though.
p.