Hi What version of Camel are you using?
And what does your direct route look like? Setting a header with the key "CamelBeanMethodName" ought to take precedence on the name of the method to invoke. eg the key name is from a constant on Exchange.BEAN_METHOD_NAME You can enable and use the tracer to see what the message contains when being routed, to see the header is present when it hit the bean http://camel.apache.org/tracer On Wed, Mar 7, 2012 at 8:21 PM, codemonkey73 <[email protected]> wrote: > We've built a small directory of services (POJOs) for which we have built > direct to bean routes. They've worked so far when using a ProducerTemplate > to call the direct route. To specify the method when using > ProducerTemplate, we use requestBodyAndHeader("direct:myService", > [methodparameterOrNull], "CamelBeanMethodName", "myServiceMethodSignature"). > > Now I'm trying to call these services from an established web project which > doesn't use spring or camel. I'm trying to minimize the changes to that > project and keep spring and camel out, so I thought I would try to set up a > servlet route in the Camel project, and then route that servlet call to the > services directory via a direct route. The simple servlet routing is > working, but what I can't figure out is the routing from the servlet to the > existing direct routes of the services. > > I've tried variations of the following: > > from("servlet:///servletRouteMapping"). > setHeader("CamelBeanMethodName", constant("myServiceMethodSignature")). > to("direct:myService"); > > The response my client gets is 'Not Implemented Yet'. > > I was planning on using different servlet mappings and routes for each of > the methods of the service. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/how-to-specify-which-method-when-calling-a-direct-route-tp5545275p5545275.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
