Yes, it's not very well documented.
Here is an example:

in the middle of a route I do:

<to uri="bean:org.apache.commons.lang3.StringUtils?method=substring(
${body}, 149 )" />

which will replace the body after the step in the route with the
substring 150 chars into the incoming payload.

2013/2/27 bikehead <bikeh...@gmail.com>:
> Is it possible to invoke a static method to a class within my camel.xml
> configuration?
>
> For example I'd like to do something like:
> <bean class="org.apache.log4j.MDC" method="put('dpservices.storyKey',
> ${body.urlKey})" />
>
> Googleing shows an example of java route builder doing the equivilant of:
> .bean(org.apache.log4j.MDC.class, "put('dpservices.storyKey',
> ${body.urlKey})"
>
> when buiding the route, but I can't find any discussion of doing it in an
> xml file
>
>
> -Brian
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Invoking-a-static-bean-method-in-my-camel-xml-tp5728228.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to