java - Apache CXF Client proxy settings -
i trying develop consumer soap service using tutorial @ http://cxf.apache.org/docs/developing-a-consumer.html
in section ,"setting connection properties contexts" looking @ code below
// set request context property. java.util.map<string, object> requestcontext = ((javax.xml.ws.bindingprovider)port).getrequestcontext(); requestcontext.put(contextpropertyname, propertyvalue); // invoke operation. port.someoperation();
can tell me if can set proxy server settings using requestcontext properties , how ?. code running behind proxy , need outgoings soap calls use proxy server settings.
proxy setting set using httpconduit object
helloservice hello = new helloservice(); helloporttype helloport = cliente.gethelloport(); org.apache.cxf.endpoint.client client = clientproxy.getclient(helloport); httpconduit http = (httpconduit) client.getconduit(); http.getclient().setproxyserver("proxy"); http.getclient().setproxyserverport(8080); http.getproxyauthorization().setusername("user proxy"); http.getproxyauthorization().setpassword("password proxy");
Comments
Post a Comment