Hi,

I am using camel 2.2, though I did give this a shot with 2.5

I have a route that has an http endpoint that is configured at startup. In
my route builder I have something like:

String wsUrl = "http://host/ws";;

from("activemq:somequeue")
    .bean("someBean")
    .to(wsUrl);

While trying to create a unit test for this route, I am adding an
interceptSendToEndpoint to direct any requests to the wsUrl endpoint to a
mock endpoint.

I am unable to get the interceptor to work as long as I have a variable in
the original route endpoint. If I replace .to(wsUrl) with
.to("http://host/ws";) everything works fine in my test. The documentation
mentions that interceptSendToEndpoint should be fine with a dynamic URI.

Is there a way to use the interceptor in my test without a hard coded string
in the route endpoint?

Thanks,

-john

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/interceptSendToEndpoint-with-dynamic-endpoint-tp3301978p3301978.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to