See the instructions at:
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

That said, defaulting in the VM properties if config isn't avail might not be 
a bad idea.   If you want to pursue it and set a patch (I don't have a proxy 
server so not really something I could test), you would probably need to add 
some code to the finalizeConfig method in HTTPConduit.  Basically, if the 
fields are not set in the ClientPolicy, set them with values from the system 
properties.

Dan


On Friday 04 June 2010 8:25:28 am Idar Borlaug wrote:
> Hi
> 
> I was wondering why my jax-ws client doesn't have proxy set
> automatically when i have specified http.proxyHost, http.proxyPort,
> proxySet, http.nonProxyHosts as vm parameters?
> 
> I tried printing the proxy settings with this code:
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> factory.setServiceClass(IssuerInvoiceServiceV10.class);
> factory.setAddress(url);
> this.service = (IssuerInvoiceServiceV10) factory.create();
> Client client = ClientProxy.getClient(service);
> HTTPConduit http = (HTTPConduit) client.getConduit();
> HTTPClientPolicy httpClientPolicy = http.getClient();
> System.out.println(httpClientPolicy.getProxyServer());
> 
> but nothing is set.
> 
> What is the best way to set proxy settings for jax-ws cxf client? Hope
> someone can help me with this.

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
  • Http proxy Idar Borlaug
    • Re: Http proxy Daniel Kulp

Reply via email to