Hi See the FAQ http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
On Tue, Aug 14, 2012 at 1:52 PM, AlanFoster <[email protected]> wrote: > Hi, > > I'm wondering if it's possible to define a header to set up where an > exchange should be send to, then access it through simple within the "to" > uri. > > For instance I have one route which sets up what service I need to send a > message to. > Then the other message sends it to the required service, then does all > appropriate response handling based on the status code returned. > > <route id="routingLogic"> > <from uri="activemq:etc" /> > > <setHeader headerName="serviceAddress"> > <constant>cxf:bean:example</constant> > </setHeader> > > <to uri="direct:sendingLogic" /> > </route> > > <route> > <from "direct:sendingLogic" /> > > <to uri="${headers.serviceAddress}" /> > > <setHeader > headerName="responseCode"><xpath>//foo/bar/responseCode</xpath><setHeader> > <choice> > .... > </choice> > </route> > > I am wondering if it is possible to use anything like this? As I currently > get the error of > > Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No > component with id '${headers.serviceAddress}' could be found > > Thanks > > Alan > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-Simple-header-notation-to-define-where-to-send-a-message-tp5717318.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
