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" <[EMAIL PROTECTED]> on 02/13/2002 07:35:20 PM Please respond to [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 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...
� Is the root element expected to be <SOAP-ENV:Body>? With marshall - I'm confused why its root element is the <SOAP-ENV:Body> tag and not the root element of the xml that is found within the BODY tag. What am I not understanding - can someone help? Thanks
