You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by user09772 <so...@gmail.com> on 2010/01/12 21:01:07 UTC
Rss Feed route config
Hey guys,
I'm trying to following to setup a camel route for google news:
from("http://news.google.com/news?output=rss").marshal().rss().to("direct:simple-rss-send");
from("direct:simple-rss-send").process(new Processor() {
public void process(Exchange e) {
LOG.info("Received exchange: " + e.getIn());
}
});
I never receive any messages, any idea what I'm doing wrong here?
thanks.
--
View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27131975.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Rss Feed route config
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 13, 2010 at 4:59 PM, user09772 <so...@gmail.com> wrote:
>
> This is what I thought I was doing:
>
> from("rss:myRssFeedURI").marshal().rss().to("direct:simple-rss-send");
> from("direct:simple-rss-send").process(new Processor() {
> public void process(Exchange e) {
> LOG.info("Received exchange: " + e.getIn());
> }
> });
>
> I do get the 'Received exchange: " log message. But the e.getIn().getBody()
> isn't a SyndFeed object. Please advise...
>
Remove the marshal rss stuff and you should get the SyncFeed object
>
>
> Claus Ibsen-2 wrote:
>>
>> On Wed, Jan 13, 2010 at 1:05 AM, user09772 <so...@gmail.com> wrote:
>>>
>>> I forgot the 'rss:' prefix in my original posting.
>>>
>>> The message is now outputting, but it's just a hex code in the
>>> getIn().getBody() call.
>>>
>>> When I turn Camel dubugging on i do see the SyndFeedImpl object populated
>>> correctly. How do I consume/access this object using Camel?
>>>
>>
>> You can just access it from a Processor or POJO.
>>
>>> Thanks.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Rss-Feed-route-config-tp27131975p27137305.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27147168.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Rss Feed route config
Posted by user09772 <so...@gmail.com>.
This is what I thought I was doing:
from("rss:myRssFeedURI").marshal().rss().to("direct:simple-rss-send");
from("direct:simple-rss-send").process(new Processor() {
public void process(Exchange e) {
LOG.info("Received exchange: " + e.getIn());
}
});
I do get the 'Received exchange: " log message. But the e.getIn().getBody()
isn't a SyndFeed object. Please advise...
Claus Ibsen-2 wrote:
>
> On Wed, Jan 13, 2010 at 1:05 AM, user09772 <so...@gmail.com> wrote:
>>
>> I forgot the 'rss:' prefix in my original posting.
>>
>> The message is now outputting, but it's just a hex code in the
>> getIn().getBody() call.
>>
>> When I turn Camel dubugging on i do see the SyndFeedImpl object populated
>> correctly. How do I consume/access this object using Camel?
>>
>
> You can just access it from a Processor or POJO.
>
>> Thanks.
>> --
>> View this message in context:
>> http://old.nabble.com/Rss-Feed-route-config-tp27131975p27137305.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27147168.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Rss Feed route config
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 13, 2010 at 1:05 AM, user09772 <so...@gmail.com> wrote:
>
> I forgot the 'rss:' prefix in my original posting.
>
> The message is now outputting, but it's just a hex code in the
> getIn().getBody() call.
>
> When I turn Camel dubugging on i do see the SyndFeedImpl object populated
> correctly. How do I consume/access this object using Camel?
>
You can just access it from a Processor or POJO.
> Thanks.
> --
> View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27137305.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Rss Feed route config
Posted by user09772 <so...@gmail.com>.
I forgot the 'rss:' prefix in my original posting.
The message is now outputting, but it's just a hex code in the
getIn().getBody() call.
When I turn Camel dubugging on i do see the SyndFeedImpl object populated
correctly. How do I consume/access this object using Camel?
Thanks.
--
View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27137305.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Rss Feed route config
Posted by user09772 <so...@gmail.com>.
Basically I'm trying to retrieve some text from any feed, and run some
processing on it (e.g. add to database, send to another queue etc.).
user09772 wrote:
>
> Hey guys,
>
> I'm trying to following to setup a camel route for google news:
>
>
> from("http://news.google.com/news?output=rss").marshal().rss().to("direct:simple-rss-send");
> from("direct:simple-rss-send").process(new Processor() {
> public void process(Exchange e) {
> LOG.info("Received exchange: " + e.getIn());
> }
> });
>
> I never receive any messages, any idea what I'm doing wrong here?
>
> thanks.
>
--
View this message in context: http://old.nabble.com/Rss-Feed-route-config-tp27131975p27136368.html
Sent from the Camel - Users mailing list archive at Nabble.com.