try
{
final String xmlRepresentation = msgToXML((MessageImpl)msg) ;
log.debug("Document is "+xmlRepresentation);
final MessageImpl nImpl = msgFromXML(xmlRepresentation) ;
ExampleObject foo = (ExampleObject) nImpl.getBody().get("foo");
assertNotNull("deserialised example object", foo) ;
assertEquals((foo.getValue() == value.getValue()), true);
names = nImpl.getBody().getNames();
assertNotNull(names);
assertEquals(names.length, 2);