You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by St...@aon.com on 2002/02/14 16:03:08 UTC

Re: Body.marshall and Body.unmarshall confusion [Virus Checked]

The reason why Body has marshall() and unmarshall() methods is so that an object
of that type can be converted to XML as specified in the SOAP protocol. So when
you marshall() a Body you should expect it to generate a valid SOAP body in XML.
The unmarshall() method is to allow a Body object to be created from SOAP XML
that arrives over the wire. This particular implementation expects the calling
code to separate the whole body subpart from the message and hand it to the
unmarshall() method. It's that simple. The intelligence to handle the body
subpart is contained in the Body class.

Now, this is not the most convenient thing for people working at the messaging
level, but it's not too bad either - just put SOAP body tags around the things
you are using to load the body. That makes sense in a way, you're loading the
body just as if your strings had just arrived off the wire.

Does that answer your question?

S-





"Rafert, Tim" <tr...@tanning.com> on 02/13/2002 07:35:20 PM

Please respond to soap-user@xml.apache.org

To:   "'soap-user@xml.apache.org'" <so...@xml.apache.org>
cc:    (bcc: Steve Salkin/3rd/US/AON)

Subject:  Body.marshall and Body.unmarshall confusion  [Virus Checked]



I'm still very  confused by the Body.unmarshall() and now also  Body.marshall().

With unmarshall - I  still don't understand why it is throwing out the root
element of the  xml...