camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Spring DSL - Intercept criteria body
Date Tue, 19 Feb 2013 11:57:32 GMT
Hi

Try with
${bodyAs(String)}

And you may need to enable stream caching
http://camel.apache.org/stream-caching.html

On Tue, Feb 19, 2013 at 12:48 PM, Alban Joly
<alban.joly@groupemoniteur.fr> wrote:
> Hi all,
>
> I am trying to config an interception with criteria on BODY. My problem is
> the body is an instance of InputStreamCache and my criteria is never
> evaluate to true (I would like to evaluate a parameter in the POST request)
>
> My context config :
>
> <camelContext xmlns="http://camel.apache.org/schema/spring" trace="true">
>         <intercept>
>
>                         <when>
>                                 <simple>${body} contains 'Hello'</simple>
>                         </when>
>                         <to uri="log:Async_is_true?level=TRACE" />
>
>                         <stop />
>                 </intercept>
>                 <route>
>
>                         <from uri="servlet:///blabla?matchOnUriPrefix=true" />
>                         <to
>
> uri="http4://localhost:2222blibli?bridgeEndpoint=true&amp;throwExceptionOnFailure=false"
> />
>                 </route>
> </camelContext>
>
> Anyone can help me please ?
>
> Camel version : 2.10.3
> Spring version :  3.0.7
>
> Thank you!
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Spring-DSL-Intercept-criteria-body-tp5727784.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

Mime
View raw message