0
votes

I am looking for an Spring integration XML config that creates the payload object in a chain using one of the headers.

Java DSL has org.springframework.messaging.support.MessageBuilder.withPayload support that can create a message with payload, Can someone please share an XML configuration equivalent to this, which can set payload with a given header of the Message.

-Praveen

1

1 Answers

0
votes

Clearly that is a Transformer responsibility and in pure xml you can do this:

<transformer expression ="headers.my_header_for_payload"/>

And the result of that SpEL becomes as a payload of output message from the transformer.