transformerFactory.newTransformer().transform(soapMessage.getPayloadSource(), payload);
message.setPayload(payload.toString());
return message;
} catch(TransformerException e) {
throw new CitrusRuntimeException("Failed to transform SOAP message body to payload", e);
} catch (UnsupportedEncodingException e) {
throw new CitrusRuntimeException("Found unsupported default encoding", e);
} catch (IOException e) {
throw new CitrusRuntimeException("Failed to read SOAP message payload", e);
}
}