title: accessing initial exchange message in camel
body: <p>Hi guys I have the following situation when I need to have "composite" process for the XML request. This is snippet from my spring route definition:</p>
  
  <pre><code>        &lt;route id="request1"&gt;
          &lt;from uri="activemq:request1" /&gt;
          &lt;unmarshal ref="integrationServerJaxb" /&gt;
          &lt;bean ref="createTINValidationMessage" /&gt;
          &lt;bean ref="switchComponent" /&gt;
          &lt;bean ref="createCreateTINMessage" /&gt;
          &lt;bean ref="switchComponent" /&gt;
          &lt;bean ref="createResponse1" /&gt;
          &lt;marshal ref="integrationServerJaxb" /&gt;
      &lt;/route&gt;
  </code></pre>
  
  <p>Basically what I want to achieve is: </p>
  
  <ol>
  <li>grab a message from request1 message queue</li>
  <li>create TIN VALIDATION message from it</li>
  <li>send TIN VALIDATION message to the switch</li>
  <li>wait for the switch response</li>
  <li>with the switch response from step 4 AND initial request 1 XML message, create CREATE TIN message</li>
  <li>send message (from step 5) to the switch</li>
  <li>create response XML based on response from switch (from step 6)</li>
  </ol>
  
  <p>So in other words, I need to get hold of initial message during processing. In the CreateCreateTINMessage bean I can change the method parameter to Message type, then it will be mapped to the actual Camel Message (from the previous step though), not the very first message in the exchange. Inspecting the message's exchange, I could trace the initial JMS message with request1 xml payload but getting that deep does not seem right. My question is, is it possible to somehow perform integration with intermediary result and initial message from the route? Thank you.</p>