On Friday 16 July 2010 8:44:37 am Dmytro Pishchukhin wrote:
> Hello,
> 
> I'm trying to configure CXF client to access a server via SOCKS5 proxy
> server with this code:
> ...
> 
>                 Client client = ClientProxy.getClient(service);
>                 HTTPConduit http = (HTTPConduit) client.getConduit();
>                 HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>                 httpClientPolicy.setProxyServer(host);
>                 httpClientPolicy.setProxyServerPort(port);
>                
> httpClientPolicy.setProxyServerType(ProxyServerType.SOCKS));
> ProxyAuthorizationPolicy policy = new
> ProxyAuthorizationPolicy();
>                 policy.setUserName(user);
>                 policy.setPassword(pass);
>                 http.setProxyAuthorization(policy);
>                 http.setClient(httpClientPolicy);
> ...
> 
> But it does not work for me. Do I have to configure it in another way?

That should be everything that's needed.   What version of CXF are you using.   
Make sure you are using 2.2.9.

Also, is the proxy server connected via SSL?  If not, any chance you can 
wireshark the wire transfers?  Sometimes that info can help diagnose what's 
happening.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to