//调用方法
public String callServiceEsbGFY(BsServiceDict bsdVo, String custIdValue, Map servParam)
throws SysException, AppException {
System.out.println("servParam"+servParam.toString());
String retMsg = null;
String soapActionURI = "http://tempuri.org/selectVIN";
//处理入参
String str="<?xml version=\"1.0\" encoding=\"gb2312\"?>
Set keys = servParam.keySet();
if(keys != null) {
Iterator iterator = keys.iterator();
while(iterator.hasNext()) {
String key =iterator.next();
str=str+"\""+key+"\""+"="+"\""+servParam.get(key)+"\""+" ";
}
str=str+">";
}
String endpoint =bsdVo.getServiceAddress();
String methodStr = bsdVo.getMethodName();
String input = bsdVo.getInParam();
try {
input=input.replace(Constants.STRING_CHARACTER_GFY, str);
System.out.println(input);
//System.out.println("trustAllHttpsCertificates");
/*trustAllHttpsCertificates();
HttpsURLConnection.setDefaultHostnameVerifier(hv);*/
//trustAllHosts();
AxisProperties.setProperty("axis.socketSecureFactory","com.bbcare.comm.MySocketFactory");//注意包名
System.out.println("测试中");
org.apache.axis.client.Service service = new org.apache.axis.client.Service();
Call call = (Call) service.createCall();
String endpoint1 ="https://esbouter.ipmch.com/ESBOuterService.asmx";
call.setOperationName(new QName( endpoint1 , methodStr));
call.setUseSOAPAction(true);
call.setSOAPActionURI(soapActionURI);
//call.addParameter("username", XMLType.XSD_STRING, ParameterMode.IN);
//URL realUrl =new java.net.URL(endpoint);
call.setTargetEndpointAddress (new java.net.URL(endpoint));
retMsg = (String) call.invoke(new Object[] {input} );
} catch (Exception e) {
retMsg = "10000";
e.printStackTrace();
throw new SysException("","XmlException:OrderReceive.buildOrderReceiveXML():"+e.getMessage(),e);
}
return retMsg;
}