camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Ramkumar.I...@cognizant.com>
Subject RE: Split, transform and aggregate RSS XML feed
Date Fri, 02 Nov 2012 15:13:17 GMT
Have you written a Content Enricher?

-----Original Message-----
From: Martin Stiborsk√Ĺ [mailto:martin.stiborsky@gmail.com]
Sent: Friday, November 02, 2012 8:19 PM
To: users@camel.apache.org
Subject: Split, transform and aggregate RSS XML feed

Hello,
currently I'm working on a case, where is RSS XML feed as data source,
which I need to grab and parse/transform in to POJO classes structure and
the return back as JSON.

Concerning the relevant route in Camel, I have restlet as the consumer
endpoint (there are few things needed to declare in the GET request to
fetch needed RSS feed). In the middle is a Camel HTTP component to fetch
the RSS XML feed and then should follow some transformation strategy to
POJO classes and then send  response back to browser/user (producer
endpoint).

The structure of the RSS XML feed is nothing tricky, it has simple
structure, simply there is a tag I know, which should be used to split by,
to get each chunk of the feed.

So, I tried tokenizeXML() to split the feed. Good, it works. Then, I tried
custom Aggregation Strategy, to get all pieces back together. Works as well.
But, where in this scenario fit the transformation part? Right in the
Aggregation Strategy? Why not, it works as well for me. But I'm not sure,
if all that is correct.

There should be separated transformation step in the route, what you say?

Thanks for hints, guys!

--
S pozdravem
Martin Stiborsk√Ĺ

Jabber: stibi@njs.netlab.cz
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information. If you are not the intended recipient(s),
please reply to the sender and destroy all copies of the original message. Any unauthorized
review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or
any action taken in reliance on the contents of this e-mail is strictly prohibited and may
be unlawful.

Mime
View raw message