camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From codemonkey73 <bpres...@progenygenetics.com>
Subject how to specify which method when calling a direct route?
Date Wed, 07 Mar 2012 19:21:43 GMT
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.

Mime
View raw message