public T payloadModel ( Object payload ) { Assert . notNull ( applicationContext , "Citrus application context is not initialized!" ) ; if ( ! CollectionUtils . isEmpty ( applicationContext . getBeansOfType ( Marshaller . class ) ) ) { return payload ( payload , applicationContext . getBean ( Marshaller . class ) ) ; } else if ( ! CollectionUtils . isEmpty ( applicationContext . getBeansOfType ( ObjectMapper . class ) ) ) { return payload ( payload , applicationContext . getBean ( ObjectMapper . class ) ) ; } throw new CitrusRuntimeException ( "Unable to find default object mapper or marshaller in application context" ) ; }
Expect this message payload as model object which is marshalled to a character sequence using the default object to xml mapper that is available in Spring bean application context .