There is a whenAnyExchangeReceived / whenExchangeReceived you can use with a processor where you can change the exchange as you like
On Wed, Oct 12, 2016 at 3:49 PM, Damage_Shadow <[email protected]> wrote: > Is there any way to return whole message with body and headers in case of > mocked endpoint org.apache.camel.component.mock.MockEndpoint. I can see only > > /** > * Set the expression which value will be set to the message body > * @param expression which is use to set the message body > */ > public void returnReplyBody(Expression expression) { > this.defaultProcessor = ProcessorBuilder.setBody(expression); > } > > /** > * Set the expression which value will be set to the message header > * @param headerName that will be set value > * @param expression which is use to set the message header > */ > public void returnReplyHeader(String headerName, Expression expression) > { > this.defaultProcessor = ProcessorBuilder.setHeader(headerName, > expression); > } > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/MockEndpoint-can-either-returnReplyBody-or-returnReplyHeader-not-both-tp5788688.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
