Hi
Remember to doco this as corporations that I work within tend to have all
kind of weird network restrictions and usage of HTTP proxy is quite common.
So easy configuration is a must.
James.Strachan wrote:
>
> On 16/10/2007, Roman Kalukiewicz <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I'm new to camel, so maybe my question is obvious. Anyway I was trying
>> to find an answer in google / camel web page / sources and I've
>> failed.
>>
>> My question is about HTTP endpoint and support for SSL and HTTP Proxy.
>> Is there any way to configure them?
>> As far as I can see HTTP endpoint uses HTTP Client that supports those
>> things, but I cannot find where to configure them. Plain HTTPS
>> probably works just fine but what when I have to set my custom key
>> store or client side certificate?
>
> Good catch! :)
>
> We'd not provided an easy way to configure those things. I've just
> patched the code to make things a bit easier.
>
> You can now grab the HttpEndpoint and configure its HttpClientParams
> property which is used to create the HttpClient in the producers and
> consumers.
>
> e.g.
>
> HttpEndpoint endpoint = context.getEndpoint("http://foo.com/bar",
> HttpEndpoint.class);
> endpoint.getClientParams().setAuthenticationPreemptive(true);
>
> etc
>
> You can also provide a strategy for completely configuring the
> HttpClient - as the configuration of a HttpClient can get kinda
> complex; with some stuff on the HttpClient, some on the
> HttpClientParams, some on the HttpState...
>
> endpoint.setHttpClientConfigurer(new HttpClientConfigurer() {
> public void configureHttpClient(HttpClient httpClient) {
> // customize proxy / authentication stuff here
> }
> });
>
> You can set this HttpClientConfigurer on the HttpComponent as well.
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source SOA
> http://open.iona.com
>
>
--
View this message in context:
http://www.nabble.com/Http-endpoint---SSL-and-HTTP-Proxy-tf4632491s22882.html#a13247958
Sent from the Camel - Users mailing list archive at Nabble.com.