You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jorgenfb <jo...@gmail.com> on 2014/10/20 10:45:05 UTC

Re: Camel 2.14-SNAPSHOT - Is interceptFrom() broken for the Rest dsl?

Did you find any solution? I'm having the same problem.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-2-14-SNAPSHOT-Is-interceptFrom-broken-for-the-Rest-dsl-tp5756537p5757801.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel 2.14-SNAPSHOT - Is interceptFrom() broken for the Rest dsl?

Posted by panzerhans <es...@tjonneland.no>.
It will not be possible to intercept a pure RESTdsl route until it has been
implemented in the camel-core. However I was able to work around it by
piping it into a normal route like this:

rest("/holdings").description("Holdings service") 
         .consumes("application/json").produces("application/json") 
         .get("/{ID}").description("List the customers holdings for the
given ID.")
         .outTypeList(InsuranceDTO.class)
         *.route().to("direct:your-direct-route-here");*

*from("direct:your-direct-route-here").to("log:hello");*

Now your interceptor will pick up the data going to the direct endpoint.
Although a bit later than you might prefer. This  should get you going until
the core supports interceptors for the REST DSL.




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-2-14-SNAPSHOT-Is-interceptFrom-broken-for-the-Rest-dsl-tp5756537p5757804.html
Sent from the Camel - Users mailing list archive at Nabble.com.