(MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
// If the value contains just the xml data, then you can create the Message directly from the
// Block. If the value contains attachments, you need to do more.
// TODO For now the only value that contains Attachments is SOAPMessage
if (value instanceof SOAPMessage) {
message = mf.createFrom((SOAPMessage)value);
} else {
block = factory.createFrom(value, null, null);
message = mf.createFrom(block, null, proto);
}
} catch (Exception e) {