Hi

Yeah you can access the headers as well in the testData method. Read
about bean parameter binding
http://camel.apache.org/bean-binding.html
http://camel.apache.org/parameter-binding-annotations.html
http://camel.apache.org/bean

On Mon, Jun 24, 2013 at 1:53 PM, indrayani <ind.k...@gmail.com> wrote:
> Hi all,
>  my camel route is defined as follows :
>
>  <bean id="testbean" class="com.CamelWeb.Transformer" />
>
>   <camelContext xmlns="http://camel.apache.org/schema/spring";>
>        <route id="route1">
>            <from uri="servlet:///application1"/>
>             <transform>
>                 <method bean="testbean" method="testData"/>
>             </transform>
>             <to uri="activemq:queue:inbox"/>
>        </route>
>
> in the testdata method, i am accessing the body as follows
>
> public static void testData(String body)
>         {
>                 body = body.replaceAll("\n", "<br/>");
>                 System.out.println("-------------- inside transformer : 
> testdata :
> "+body);
>         }
>
> the system out statement actually prints the message body.
>
> my query is,  is it possible to access header values in the message in
> <transform>
> another question is , i was searching for this explanation that how why am i
> getting the message body for <transform>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/using-transform-to-read-header-tp5734659.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to