On Thu, Dec 8, 2011 at 1:51 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > On Thu, Dec 8, 2011 at 6:55 AM, Castyn <eric.ben...@gmail.com> wrote: >> For example, lets say I had a value in a route that I could get with some >> simple xpath, but I needed to pass that as a parameter to a bean that would >> do some calculation on that value and return it, so that I could then set it >> as a header or such. Is there a way this could be done without relying on a >> custom processor? >> >> For instance, I know I can do the following to get a value from a bean >> method: >> <setHeader headerName="lastRunDate"> >> <method ref="lastRun" method="getLastRunDate"/> >> </setHeader> >> >> But what if I want to have a bean that will take in a value thatis not the >> entire message body and do something with it? Such as a value resolved from >> this expression: >> <xpath resultType="java.lang.String">//s:randomInfo</xpath> >> >> >> How can that be best accomplished? I know a custom processor allows you >> full access to the headers and body, as would a bean with annotations of the >> headers and body, but it seems like overkill if all I would want to do is >> set and retrieve a value from a bean such as a singleton to be utilized by >> the route. >> > > Btw we talked some time ago about letting the method call expression > accept a list of expressions in the XML DSL, > so each expression maps to the given parameter index. > > That way you can embed an xpath expression to map the parameter at > that index. And for other parameters you can use <simple> <constant> > etc. >
I created a ticket to track this. https://issues.apache.org/jira/browse/CAMEL-4753 > >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Date-String-Creation-tp5052753p5057766.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/