日期:2014-05-17 浏览次数:20707 次
String url="http://p2p.ips.net.cn/CreditWS/Service.asmx";
Service service = new Service();
String strSign = IpsCrypto.md5Sign(IPayConfig.ipay_mer_code+IPayConfig.cert_md5);
Call call ;
try {
call = (Call)service.createCall();
call.setTargetEndpointAddress(url);
call.setOperationName("GetBankList");
call.addParameter(new QName("argMerCode"), XMLType.XSD_STRING, ParameterMode.IN);// 给call对象设置方法的参数名、参数类型、参数模式
call.addParameter(new QName("argSign"), XMLType.XSD_STRING, ParameterMode.IN);// 给call对象设置方法的参数名、参数类型、参数模式
call.setReturnType(XMLType.SOAP_STRING);// 设置调用方法的返回值类型
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/GetBankList");
String obj =(String)call.invoke(new Object[]{IPayConfig.ipay_mer_code,strSign});
System.out.println(obj);
} catch (Exception e) {
e.printStackTrace();
}