0
这是我的代码..我尝试使用.asmx?WSDL webservice。org.apache.axis2.AxisFault:传输错误:407错误:需要代理验证
错误: org.apache.axis2.AxisFault:传输错误:407错误:需要代理身份验证
package org.tempuri;
import org.apache.axis2.AxisFault;
import org.tempuri.ServiceStub.Get_All_Pendancy_List;
import org.tempuri.ServiceStub.Get_All_Pendancy_ListResponse;
public class TestClient {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
//
//
//Proxy Settings
System.getProperties().put("http.proxyHost", "111.11.11.11");
System.getProperties().put("http.proxyPort", "1111");
System.getProperties().put("http.proxyUser", "11111");
System.getProperties().put("http.proxyPassword", "[email protected]");
ServiceStub serviceStub = new ServiceStub();
Get_All_Pendancy_List gpl = new Get_All_Pendancy_List();
gpl.setDept_code("1111");
gpl.setUsr("1111");
gpl.setPasswd("[email protected]");
gpl.setDate("01/01/2012");
Get_All_Pendancy_ListResponse response = serviceStub.get_All_Pendancy_List(gpl);
System.out.println(response.getGet_All_Pendancy_ListResult());
} catch(AxisFault e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
}
什么建议?我应该如何设置我的代理配置?
是后面代理服务器?。然后,你需要提供代理主机参数后端srvice axis2.xml运输发件人 – Ratha 2013-03-18 19:19:50
我尝试设置在axis2.xml的代理服务器设置..但不能让它工作.. <参数名称= “代理”> <配置> example.org 示例\ saminda ppp ProxyPassword> Configuration> –
SaK
2013-03-19 09:31:13