You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "dss.light" <ds...@gmail.com> on 2013/04/16 15:24:05 UTC

Re: InterceptSendToEndpoint - Http Component

Hi, tried to use this feature for testing - excellently like advised - it
still did not skip intercepted endpoint.

Camel 2.10.4

What I am doing wrong? The first endpoint changed and worked;
In the log I see trying to post message to localhost.
And test fell down with exception.
I simply want to replace last endpoint to the other one.

code 

        context.getRouteDefinitions().get(0).adviceWith(context, new
AdviceWithRouteBuilder() {
            @Override
            public void configure() throws Exception {               
                replaceFromWith("direct:start");
                interceptSendToEndpoint(ReceiverBridge.TO_ENDPOINT)
                .skipSendToOriginalEndpoint()
                .to("mock:result");
            }
        });



--
View this message in context: http://camel.465427.n5.nabble.com/InterceptSendToEndpoint-Http-Component-tp3296620p5730970.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: InterceptSendToEndpoint - Http Component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Possible use wildcards in the interceptSendToEndpoint to match the
http url. As if you have parameters then that's tricky.
See details about wildcards at: http://camel.apache.org/intercept

On Tue, Apr 16, 2013 at 3:24 PM, dss.light <ds...@gmail.com> wrote:
> Hi, tried to use this feature for testing - excellently like advised - it
> still did not skip intercepted endpoint.
>
> Camel 2.10.4
>
> What I am doing wrong? The first endpoint changed and worked;
> In the log I see trying to post message to localhost.
> And test fell down with exception.
> I simply want to replace last endpoint to the other one.
>
> code
>
>         context.getRouteDefinitions().get(0).adviceWith(context, new
> AdviceWithRouteBuilder() {
>             @Override
>             public void configure() throws Exception {
>                 replaceFromWith("direct:start");
>                 interceptSendToEndpoint(ReceiverBridge.TO_ENDPOINT)
>                 .skipSendToOriginalEndpoint()
>                 .to("mock:result");
>             }
>         });
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/InterceptSendToEndpoint-Http-Component-tp3296620p5730970.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen