// For MESSAGE mode, work with the entire message, Headers and Body
// This is based on logic in org.apache.axis2.jaxws.client.XMLDispatch.createMessageFromBundle()
if (value instanceof SOAPMessage) {
message = msgFactory.createFrom((SOAPMessage)value);
} else {
Block block = factory.createFrom(value, null, null);
message = msgFactory.createFrom(block, null, messageProtocol);
}
} else {
// PAYLOAD mode deals only with the body of the message.
Block block = factory.createFrom(value, null, null);