camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Camel JMS to CSV (with Excel Strategy)
Date Fri, 24 Aug 2012 12:04:32 GMT

I suggest to read background information about the EIPs you are using,
eg in this case the filter EIP.

The filter is only for routing, its like an if structure:

if X {

The filter does not alter, transform, or anyhow change the message.

If you want to change the message, then look for some of the EIPs for
the such as message translator, content enricher, etc.
And in your case there is also the splitter EIP if you want to split
up a messages into multiple messages.

The eips is all documented here

And for comprehensive background materiel, then there is the EIP
bible, the EIP book by Gregor and Bobby. A link to the book from here

On Fri, Aug 24, 2012 at 11:43 AM, Joe San <> wrote:
> May be I started with a complex example. So I decided to start with a
> simple xml without namespace definitions:
> <info>
>     <address>
>         <street>xyz</street>
>         <city>Frankfurt</city>
>     </address>
>     <person>
>         <name>jothi</name>
>         <age>32</age>
>         <country>Germany</country>
>     </person>
> </info>
> Goal is to read the above xml from inbox, split and extract the person and
> write that as an xml to outbox.
> I have the route definition as below:
> from("file://C:/folders/inbox?noop=true").filter().xpath("//info/person/name").to("file://C:/folders/outbox");
> The route runs without and problems, but the outbox contains the same xml
> as inbox. I would expect the outbox to have just the following:
>     <person>
>         <name>jothi</name>
>         <age>32</age>
>         <country>Germany</country>
>     </person>
> Why does it not filter? I'm sure that I'm doing something wrong here. Can
> anyone please point out the mistake?
> Regards,
> Jothi

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

View raw message