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,
http.nonProxyHosts.

These settings seem to be ignored by camel, so I have also explicitly
set the HTTP proxy in camelContext (code is groovy):

    camelContext.properties['http.proxyHost'] =
System.properties['http.proxyHost']
    camelContext.properties['http.proxyPort'] =
System.properties['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,

Alex


For interest, most common exception I got:

    ## 05 Sep 2013 13:49:32,931 ## seda.SedaConsumer Error processing
exchange. Exchange[Message: test]. Caused by: [java.io.IOException -
Stream closed]
    java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:151)
        at java.io.BufferedInputStream.available(BufferedInputStream.java:398)
        at 
org.apache.commons.httpclient.ContentLengthInputStream.available(ContentLengthInputStream.java:213)
        ...

Reply via email to