Since your original message is just text, you can copy it into the header field. This should work as long as you do nothing special between when you store and then retrieve it.
So I would try:
<int:header-enricher input-channel="authenticated-channel" output-channel="pre-routing-channel"> <int:header name="original-payload" expression="payload.toString()" /> </int:header-enricher> <int-xml:xpath-router id="servicetype-router" input-channel="pre-routing-channel" evaluate-as-string="true">
If this does not work for you (perhaps because you need to do something more special between or the payload is too high), you still have the option to use ClaimCheck . In fact, this is exactly what you are asking for. To do this, you will need a MessageStore , and then just save the message payload before modifying it. Therefore, instead of the enrichment header, you call
<int:claim-check-in input-channel="authenticated-channel" output-channel="pre-routing-channel" message-store="payloadstore" /> <bean id="simpleMessageStore" class="org.springframework.integration.store.SimpleMessageStore"/>
source share