获取异常javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:未找到证书路径的信任锚

时间:2016-04-13 10:12:51

标签: android

我知道我们必须在服务器端处理证书,但现在必须在android中以这种方式工作。我在这条线上得到了这个消息 androidHttpTransport.call(strSoapAction,envelope); 但我也想处理异常并暂时忽略并获得响应 请帮忙 我在AsyncTask,doInBackground中编写了这段代码 贝娄是我的代码,是一种通过https异常的方式? 我现在用过这个,http://blog.syedgakbar.com/2012/07/android-https-and-not-trusted-server-certificate-error/ 但是如何进一步发送请求和响应?

SoapObject request = new SoapObject("https://something.something.com/", "method");
String strSoapAction = "https://something.something.com/method";
request.addProperty("strObjectName", arrParams[0]);
request.addProperty("strCommand", arrParams[1]);
request.addProperty("strXMLParameters", arrParams[2]);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;

envelope.setOutputSoapObject(request);

HttpTransportSE androidHttpTransport =  null;
androidHttpTransport = new       HttpTransportSE("https://db.server.com/some.asmx"); 


androidHttpTransport.call(strSoapAction, envelope); //getting exception over here
Object result = (Object)envelope.getResponse();

0 个答案:

没有答案