2.9.0.. but i believe camel is fine, i have something dodgy going on somewhere else as my message does not get routed properly. I have posted a more completed message for that :(
thanks in advance and regards marco On Sat, Sep 22, 2012 at 6:08 PM, Raul Kripalani <[email protected]> wrote: > While all keys are converted to lower case as Christian suggests, your > routing rule should work because comparison also converts to lower case > IIRC. > > The syntax in your expression is valid from Camel 2.9.2 onwards. What > version are you on? > > - Raúl. > On Sep 22, 2012 5:20 PM, "Marco Mistroni" <[email protected]> wrote: > > > Hi all > > i have a camel processor which sets a header before passing the message > to > > a <camel:route> component > > > > .... > > exchange.getOut().setHeader("jsonHeader", action); > > exchange.getOut().setHeader("jsonContent", jsonData); > > ..... > > > > here's the context > > > > <camel:route id="Jetty_Sample"> > > <camel:from uri="jetty:http://localhost:8888/myJettyService" > > /> > > <!-- camel:marshal ref="jsonFormatter" /--> > > <camel:process ref="myJettyService" /> > > <camel:to uri="seda:jsonRouting" /> > > > > </camel:route> > > > > <camel:route id="jettyRouting"> > > <camel:from uri="seda:jsonRouting" /> > > <camel:process ref="myJettyService2" /> > > > > <camel:choice> > > <camel:when> > > <camel:simple>${in.headers[jsonHeader]} == > > 'shareManagement' > > </camel:simple> > > <camel:to uri="seda:jsonShares" /> > > </camel:when> > > ...... > > </camel:choice> > > > > > > I have been struggling in trying to figure out why my message wasn't > being > > passed to the correct route > > so i decided to put a processor in the route message to print out all the > > headers..... (i prob should have used a camel:log,but i m still > > learning...) > > > > LOGGER.info("In jetty msg processor...."); > > try { > > > > for(String head : exchange.getIn().getHeaders().keySet()) { > > LOGGER.info("**" + head + "=" + > > exchange.getIn().getHeader(head)); > > } > > > > } catch (Exception e) { > > > > > > > > It turns out the original jsonHeader became jsonheader (lost the capital > > 'H'), and jsonContent became jsoncontent > > > > is that a bug? or it is expected? > > > > w/kindest regards > > marco > > >
