public T payload ( Object payload , Marshaller marshaller ) { StringResult result = new StringResult ( ) ; try { marshaller . marshal ( payload , result ) ; } catch ( XmlMappingException e ) { throw new CitrusRuntimeException ( "Failed to marshal object graph for message payload" , e ) ; } catch ( IOException e ) { throw new CitrusRuntimeException ( "Failed to marshal object graph for message payload" , e ) ; } setPayload ( result . toString ( ) ) ; return self ; }
Expect this message payload as model object which is marshalled to a character sequence using the default object to xml mapper before validation is performed .