Thanks for the suggestion. I was just messing around with the routes and
transformations.

I will have a look at the EIP's.

Regards,
Jothi

On Fri, Aug 24, 2012 at 2:04 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> 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
> http://camel.apache.org/eip
>
> 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
> http://camel.apache.org/books
>
>
> On Fri, Aug 24, 2012 at 11:43 AM, Joe San <codeintheo...@gmail.com> 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
> -----------------
> FuseSource
> Email: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Reply via email to