webservice axis2客户端设置代理方法(公司网络通过代理访问时)
webservice axis2客户端设置代理方法(公司网络通过代理访问时)
UploadProcessInServiceStub stub = new UploadProcessInServiceStub(endPoint);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_10);
ProxyProperties proxyProperties=new ProxyProperties();
proxyProperties.setProxyName("proxy.XXX.com");
proxyProperties.setProxyPort(8080);
proxyProperties.setUserName("song-zhp");
proxyProperties.setPassWord("xxxxx");
proxyProperties.setDomain("http://dl-proxy.XXX.com");
stub._getServiceClient().getOptions().setProperty(HTTPConstants.PROXY, proxyProperties);
这只是其中一种方法.