1 Reply Latest reply on Jan 26, 2015 6:37 AM by André Francisco

    Camel Binding - Header manipulation

    André Francisco Newbie

      Hello,

       

      We are using the camel exchange header and we are not being able to manipulate the header once it's set. We are setting an xml in the header and we would like to set some values to those xml nodes.

       

      So far we are receiving the exchange to be manipulated by JMS and we are trying to manipulate the header to add values to the nodes.

      Our main route is something like this:

       

          <route streamCache="true" id="Main">

              <from uri="switchyard://endpoint" />

              /** Here we would like to manipulate the header ${headers.header} **/

             <wireTap uri="direct:routeMessage" copy="true">

                  <body>

      <simple>${headers.header}</simple>

                  </body>

             </wireTap>

              <to uri="switchyard://newEndPoint"/>

              /** Here we would like to manipulate the header ${headers.header} again **/

              <wireTap uri="direct: routeMessage " copy="true">

                  <body>

      <simple>${headers.header}</simple>

                  </body>

             </wireTap>

          </route>

         

      And our header is something as this fields, among others:

      <Header>

      <Info>

      <InternalID></ InternalID >

      </Info>

      <StartTime></StartTime>

      <EndTime></EndTime>

      </Header>

       

       

      We would like to be able to manipulate the header where we mention above so we could set values on the nodes. We have a xslt file to do some transformations and it would be great if we could manipulate the header directly with the xslt, but any other way to do it would be much appreciated.

       

       

      Thank you in advance