camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Howto apache camel-rss & https.proxyHost & xml blueprint & karaf ?
Date Wed, 18 Feb 2015 17:52:39 GMT
Hi

Try with JVM system properties.
https://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

Some components may support those.

Setting <properties> in the XML file does not make em JVM system properties.

On Wed, Feb 18, 2015 at 2:22 PM, Matteo Redaelli
<matteo.redaelli@gmail.com> wrote:
> How can I configure a proxy server in a camel (2.14.0) xml blueprint file?
>
> I did the following but it does not work
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>
>   <camelContext id="test-news" xmlns="
> http://camel.apache.org/schema/blueprint">
>     <properties>
>       <property key="http.proxyHost" value="myproxy.com"/>
>       <property key="http.proxyPort" value="80"/>
>       <property key="https.proxyHost" value="myproxy.com"/>
>       <property key="https.proxyPort" value="80"/>
>     </properties>
>
>     <route id="test-news">
>       <from uri="rss:
> http://www.telerama.fr/rss/services/podcast_cinema.xml.php?flux=CinemaPodcast&amp;delay=60"
> />
>       <marshal> <rss/> </marshal>
>       <setHeader headerName="test-news-id">
>         <simple>pirelli</simple>
>       </setHeader>
>       <to uri="log://tmp/" />
>       <to uri="file://tmp/" />
>     </route>
>
>   </camelContext>
> </blueprint>
>
>
> I get the following error
>
> 2015-02-18 14:05:46,084 | WARN  | t_cinema.xml.php |
> RssEntryPollingConsumer          | 58 - org.apache.camel.camel-core -
> 2.14.0 | Consumer Consumer[rss://
> http://www.telerama.fr/rss/services/podcast_cinema.xml.php?delay=60&flux=CinemaPodcast]
> failed polling endpoint: Endpoint[rss://
> http://www.telerama.fr/rss/services/podcast_cinema.xml.php?delay=60&flux=CinemaPodcast].
> Will try again at next poll. Caused by: [java.net.ConnectException -
> Connection timed out]
> java.net.ConnectException: Connection timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.7.0_45]
>         at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[:1.7.0_45]
>         at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)[:1.7.0_45]
>         at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)[:1.7.0_45]
>         at
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[:1.7.0_45]
>         at java.net.Socket.connect(Socket.java:579)[:1.7.0_45]
>         at java.net.Socket.connect(Socket.java:528)[:1.7.0_45]
>         at
> sun.net.NetworkClient.doConnect(NetworkClient.java:180)[:1.7.0_45]
>         at
> sun.net.www.http.HttpClient.openServer(HttpClient.java:432)[:1.7.0_45]
>         at
> sun.net.www.http.HttpClient.openServer(HttpClient.java:527)[:1.7.0_45]
>         at
> sun.net.www.http.HttpClient.<init>(HttpClient.java:211)[:1.7.0_45]
>         at sun.net.www.http.HttpClient.New(HttpClient.java:308)[:1.7.0_45]
>         at sun.net.www.http.HttpClient.New(HttpClient.java:326)[:1.7.0_45]
>         at
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)[:1.7.0_45]
>         at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)[:1.7.0_45]
>         at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)[:1.7.0_45]
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)[:1.7.0_45]
>         at java.net.URL.openStream(URL.java:1037)[:1.7.0_45]
>         at
> org.apache.camel.component.rss.RssUtils.createFeed(RssUtils.java:32)[274:org.apache.camel.camel-rss:2.14.0]
>         at
> org.apache.camel.component.rss.RssEntryPollingConsumer.createFeed(RssEntryPollingConsumer.java:54)[274:org.apache.camel.camel-rss:2.14.0]
>         at
> org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:47)[271:org.apache.camel.camel-atom:2.14.0]
>         at
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[58:org.apache.camel
>
> --
> Matteo Redaelli
> http://www.redaelli.org/matteo/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message