2014-07-24 16:37 GMT+02:00 Oliver Becherer <[email protected]>:
> hi,
>
> i assume this scenario is quite unusal (regarding answers), so i tried to 
> find a valid workaround and currently i'm trying it like this :
>
> Client client = ClientProxy.getClient(MYWEBSERVICEPORT);
> client.getRequestContext().put(Message.ENDPOINT_ADDRESS, 
> "https://some-weird-https-proxy.com";) ;
>
>
> this is working fine so far, but to tell the proxy where he has to deliver 
> the message to, i'd had to
> modify http protocol header, especially the Host variable.
>
> -> unfortunately it seems, as if the Host Variable in http header is 
> overwritten somewhere deeeeep into the Interceptor Chain or at least in 
> Transport layer
> -> my custom interceptor is setting Host Variable, but within outgoing 
> Request, its again overwritten from framework
>
>
> Could somebody please direct me , how i can avoid, that cxf is automatically 
> setting http header Host variable?

Maybe I'm wrong but I don't know what have to do Host HTTP header with
 proxy forwarding requests .
I think that proxy server shouldn't use Host header for nothing. I
should use URI requested
For example, a request with proxy settings would be as

GET  https://some-weird-https-proxy.com HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: some-weird-https-proxy.com
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive

But I think that Host header shouldn't be used by proxy to forward the request
am I wrong ?


Regards





>
> thanks a lot!
>
> kind regards
>
> O
>
>
> Am 23.07.2014 um 21:57 schrieb Oliver Becherer <[email protected]>:
>
>> hi all,
>>
>> i'm just stuck with a problem using cxf :
>>
>> i implemented a soap client to a webservice using cxf 2.6.1 and its working 
>> fine... now i have the challenge of sending one single service operation
>> to the usual endpoint but over a proxy server that only accepts https.
>>
>> so these are the base facts :
>>
>> Service Endpoint : https://some-usual-soap-endpoint.com
>>
>> Proxy Server : https://some-weird-https-proxy.com
>> Proxy Port : 7777
>>
>> This is my approach :
>>
>> HTTPClientPolicy policy = new HTTPClientPolicy();
>> policy.setProxyServer("some-weird-https-proxy.com");
>> policy.setProxyServerPort(7777);
>>
>> Client client = ClientProxy.getClient(awspt);
>> HTTPConduit http = (HTTPConduit) client.getConduit();
>> http.setClient(policy);
>>
>>
>> so far so good, but the requests are reaching the proxy not using https, but 
>> http and the proxy is not accepting this.
>>
>> can you help me, how to configure the Proxy Server within my Client, so 
>> Request is sent using https?
>>
>> any help is highly appreciated!
>>
>> kind regards
>>
>> O
>

Reply via email to