camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: How to filter ?
Date Sat, 05 Nov 2011 11:31:06 GMT
On Sat, Nov 5, 2011 at 12:04 PM, Omar Atia <> wrote:
> Dears,
> I need to know how to filter based on the body type of the exchange as body type is class
defined in my class path ...
> For example I have two body types , commandresponse.class and tisexception.class , I
need to differentiate between them to unmarshal them using jaxb and convert the body to string
> For example :
> In case of body type = commandresponse I need to marshal it with jaxb class commandresponse
and in case of tisexception I need to  marshal it with Faultmessage class ...
> The command response and tisexception are the output of cxf web service POJO dataformat

Are you use Java or XML to define the Camel routes?


In XML you can use the simple language to test

  <simple>${body} is MyClass</simple>
  <to uri=....>

You can also use the simple language in Java

  .when().simple("${body} is MyClass").to("xxx")

> Thanks,
> Omar atia
> Sent via BlackBerryŽ from mtc touch

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message