2 Replies Latest reply on Jan 4, 2012 10:43 AM by Ravi Challapalli

    Extract camel header as String

    Ravi Challapalli Newbie



      Camel version: 2.8.3


      The camel route is as below..









      The route need to populate a new header (messagePattern) based on two existing headers action & service using method MyUtil.getMessagePattern(String, String ).


      Problem here is I am unable to get the value of header("action") as a String value.

      It returns the ValueBuilder and I tried below:


         header("action").toString()  // retunrs header(action)


         header("action").convertToString().toString()  // retunrs header(action)




      I need the String value of the header(...)


      Please help!!


      Thanks in advance,



      Edited by: rchallapalli on Jan 4, 2012 12:14 PM