You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by roger_rabbit <ro...@gmx.fr> on 2013/08/08 19:31:06 UTC

Is there a way to set a proxy using camel-rss component?

Hi,

I am using a camel-rss based route to poll from a rss... This works very
well on my local bus, but does not work on another one that is behind a
proxy.
When I encountered such a problem with camel-http, I used to set a proxy
that way (with the suited values):

    	if(hasProxy){
    		getContext().getProperties().put("http.proxyHost", proxyHost);
    		getContext().getProperties().put("http.proxyPort", proxyPort);
    	}    	

But this doesn't work for camel-rss, even though the route goes to http :

from("rss:http://www.telerama.fr/rss/services/podcast_cinema.xml.php?flux=CinemaPodcast&delay=60").etc(...)

I kept getting a connection timeout error... looks like the http.proxHost is
only devoted to camel-http, and even though camel-rss might use camel-http,
it has its own definition for both thoses parameters, and thus ignoring
mines (only suppositions!)

So that the purpose of the question in my subject.. does anyone know of a
way to do that?
Or should I use camel-http and do the few camel-rss extra by myself?

Thanks in advance.



--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-way-to-set-a-proxy-using-camel-rss-component-tp5737006.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there a way to set a proxy using camel-rss component?

Posted by roger_rabbit <ro...@gmx.fr>.
Bilgin,

I did, and it worked!
(previously I used getContext().setProperties(..) to set it)

Perfect solution! Thanks a lot for the tip!

Roger



--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-way-to-set-a-proxy-using-camel-rss-component-tp5737006p5737222.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there a way to set a proxy using camel-rss component?

Posted by Bilgin Ibryam <bi...@gmail.com>.
Hi,

have you tried the following?

System.setProperty("http.proxyHost", "proxy.myproxy.com");
System.setProperty("http.proxyPort", "8080");


Bilgin

On 8 August 2013 18:31, roger_rabbit <ro...@gmx.fr> wrote:
> Hi,
>
> I am using a camel-rss based route to poll from a rss... This works very
> well on my local bus, but does not work on another one that is behind a
> proxy.
> When I encountered such a problem with camel-http, I used to set a proxy
> that way (with the suited values):
>
>         if(hasProxy){
>                 getContext().getProperties().put("http.proxyHost", proxyHost);
>                 getContext().getProperties().put("http.proxyPort", proxyPort);
>         }
>
> But this doesn't work for camel-rss, even though the route goes to http :
>
> from("rss:http://www.telerama.fr/rss/services/podcast_cinema.xml.php?flux=CinemaPodcast&delay=60").etc(...)
>
> I kept getting a connection timeout error... looks like the http.proxHost is
> only devoted to camel-http, and even though camel-rss might use camel-http,
> it has its own definition for both thoses parameters, and thus ignoring
> mines (only suppositions!)
>
> So that the purpose of the question in my subject.. does anyone know of a
> way to do that?
> Or should I use camel-http and do the few camel-rss extra by myself?
>
> Thanks in advance.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-way-to-set-a-proxy-using-camel-rss-component-tp5737006.html
> Sent from the Camel - Users mailing list archive at Nabble.com.