That would certainly help get the header values I need into Bean A as shown
below.

Route A:
        from("direct:RouteA")
            .beanRef("beanA", "retrieve(${headers})")
        ;

Bean A
        @Produce(uri = "direct:foobar")
        protected FooBarService fooBarService; 

        public ReturnValue retrieve(Map<String,String>headers) {
                String someHeader = headers.get("someHeader");
                someValue = fooBarService.foobar();
                return someValue;
        }

But I'm still not clear on how I would pass on the header value retrieved
above so that I have access to it in Route B.  In Route B, I end up with a
new DefaultExchange that doesn't contain any of the header information from
Route A.
I imagine I could modify the foobar() method in the FooBarService interface
to pass the header value, but I'm still not sure how I would have access to
the value in Route B, plus that approach seems too invasive.

Route B:
        from("direct:foobar")
                .beanRef("bean that somehow set's 'someHeader' on this
route's Exchange")
                .to("some other uri")
        ;

I'm probably missing something obvious here, so any enlightenment would be
greatly appreciated.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Passing-Headers-to-a-Route-Invoked-via-Proxy-tp5752894p5752975.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to