Convenience function to write the object as XM to the message body and set the content type.
Convenience function to read an object as XML from the message body.