axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Mietz Egli" <pe...@lightsurf.com>
Subject RE: NPE in AxisServlet.doPost()
Date Wed, 23 Jan 2002 02:47:44 GMT

It took a couple of hours, but I figured out a way around
the array of Maps problem:

My function on the SOAP server is returning an array of
java.util.Properties objects.  In ArraySerializer.serialize(),
the TypeMapRegistry contained in the SerializationContext
that is passed in only has an entry for java.util.HashMap.
I added the following lines to ArraySerializer.java just
after line 571:

  if (componentType.isAssignableFrom(java.util.Map.class)) {
    componentType = java.util.HashMap.class;
  }

I freely admit that this probably isn't the best construct;
you might want to check to see if componentType is an interface
equal to java.util.Map and/or if one of the interfaces implemented
by componentType is java.util.Map.  Resetting componentType
explicitly to java.util.Map is safe because MapSerializer only
calls methods in that interface.

If this looks like a reasonable change, can a committer check it
in?  Feel free to contact me for more details if needed.

Thanks!

p.

Mime
View raw message