You need to comment out the mockEndpoints() and specify the full URI of the http endpoint like this. mockEndpoints will mock all endpoints in the route.
context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() { public void configure() throws Exception { replaceFromWith(directEndPointURI); //mockEndpoints(); interceptSendToEndpoint(providerEndPointURI + "?throwExceptionOnFailure=false").process(new Processor() { @Override public void process(Exchange exchange) throws Exception { System.out.println("INTERCEPTED"); } }).skipSendToOriginalEndpoint(); } }); -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Monday, December 3, 2012 at 9:58 PM, lleclerc wrote: > The message "INTERCEPTED" is never printed and the request is not > intercepted, nor skipped, it is still sent over internet and we see the > content of "http://stackoverflow.com" through [httpclient.wire.content] > messages. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Test-Intercept-with-adviceWith-and-http-tp5723473p5723544.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).