The type of the message body is StreamCache so you can do, just
declare a method with that type.

Read about bean binding in the Camel docs, or chapter 4 in the Camel
in Action book.

public boolean isBigStream(StreamCache cache)  {
   return cache.length() > 9999999;
}


Or if you want to use the Camel Exchange type

public void doSomething(Exchange exchange)
   StreamCache cache = exchange.getIn().getBody(StreamCache.class);
   ...



On Fri, Sep 5, 2014 at 10:15 AM, Frankiboy <[email protected]> wrote:
> Thanks i can se that i can to something like this:
>
>
> from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching().getStreamCache().length();
>
> I want this value in my bean, soo i can log something, when the size is
> bigger then 20mb.
>
>
> But how do i get this length down in my bean, via my DSL syntax,
>
>   from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching()
>              bean(AddIpBean.class);
>
>
> Frank
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Fastet-way-to-check-the-size-of-a-soap-request-tp5756054p5756085.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to