笔记- webservice axis绕过https证书验证



     log.info("付款加载证书 完成,开始发送 url=" + serverUrl);
     // 发送
//    System.setProperty("javax.net.ssl.keyStore",PAYMONEY_KEYSTORE_URL);
//    System.setProperty("javax.net.ssl.keyStorePassword",PAYMONEY_KEYSTORE_PASS);
//    System.setProperty("javax.net.ssl.trustStore",PAYMONEY_TRUSTSTORE_URL);
//    System.setProperty("javax.net.ssl.trustStorePassword",PAYMONEY_TRUSTSTORE_PASS);

     Service service = new Service();
     Call call = (Call) service.createCall();
     call.setTargetEndpointAddress(serverUrl);

     AxisProperties.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");
     QName qName = new QName(serverUrl,"IfService");
     Object[] objects = new Object[]{ifUser,ifPass,ifCodePay,ifEvent,info};
     call.setOperationName(qName);

     // 返回结果
     String returnXML = (String) call.invoke(objects);
     log.info("returnXML====="+returnXML);


 

你可能感兴趣的:(笔记)