camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Anderson <>
Subject Using HTTP and HTTPS proxies with Camel HTTP Component
Date Thu, 05 Sep 2013 11:41:17 GMT
I'm writing some test code which uses and HTTP/HTTPS proxy to mock 3rd
party webservices.

For non-camel code, I configure the proxy using the java system properties:
http.proxyHost, http.proxyPort, https.proxyHost, https.proxyPort,

These settings seem to be ignored by camel, so I have also explicitly
set the HTTP proxy in camelContext (code is groovy):['http.proxyHost'] =['http.proxyHost']['http.proxyPort'] =['http.proxyPort']

These settings work fine *for HTTP*.  However, I can't find
documentation for getting HTTPS working.

I've tried setting other properties on the camel context, such as
https.proxyPort, http.proxyScheme, http.proxyAuthSceme,
https.proxyScheme, https.proxyAuthScheme to no avail (although I've
seen a couple of different exceptions).

I'd be happy to document my findings, but thought I should first check:

* is this a known issue?
* has it been fixed in later version of camel? (I'm using 2.9.4)
* should I expect to be able to proxy both HTTP and HTTPS to either
different or the same ports using Camel without reconfiguring in
between requests?

Thanks for any help,


For interest, most common exception I got:

    ## 05 Sep 2013 13:49:32,931 ## seda.SedaConsumer Error processing
exchange. Exchange[Message: test]. Caused by: [ -
Stream closed] Stream closed
        at org.apache.commons.httpclient.ContentLengthInputStream.available(

View raw message