[Laszlo-dev] ObjectWrapper serialization
Matthew Frederes
matt at paradisesoftware.net
Wed Jun 8 21:00:15 PDT 2005
Pablo,
The problem is that setSchemaComplexType method does not do anything
when there are no complex types in the WSDL, and thus serializers for
ObjectWrapper.class never get registered with Axis in that case.
Then if an LZX app sends an Object as a parameter, the paramNode is
still sent in the ObjectWrapper by setRPCParams, when Axis has no
knowledge of it. This is the way the error occurred.
My web service has a String as an input parameter. I wanted to send
it some well-formed XML to parse, and originally sent it as a String
from the LZX app.
However, the setRPCParams method casts each primitive data type to a
org.w3c.dom.Text object, then retrieves the data through it's getData
() method before adding the parameter to the call. This process was
striping my incoming XML string of all escaped special characters,
turning everything into literals, and crashing my DOM parser, because
the XML was no longer well-formed.
So, I started passing the LzDataElement, expecting it's contents to
be treated more kindly, which did in fact allow my well-formed XML to
make it all the way through into the call unmodified by the
framework. If Axis were prepared for serializing the ObjectWrapper
class (which contains an LzDataElement from LZX), it would provide a
way for XML to pass safely into an RPC-style web service utilizing
primitive parameters.
Matt
More information about the Laszlo-dev
mailing list