How can i attach ssl cert with ksoap2 android

会有一股神秘感。 提交于 2020-06-01 05:12:45

问题


I have implemented ksoap2 (https://simpligility.github.io/ksoap2-android/getting-started) in my android project.

Now i have a valid SSl certificate and now i want to make call every api with using that ssl certificate. My web service has HTTPS

            val envelope = SoapSerializationEnvelope(SoapEnvelope.VER11)
            envelope.setOutputSoapObject(soapObject)
            envelope.dotNet = true

            val httpTransportSE = HttpTransportSE(URL)

            try {
                httpTransportSE.call(SOAP_ACTION, envelope)
                val soapPrimitive = envelope.response as SoapPrimitive
                result = soapPrimitive.toString()
            } catch (e: Exception) {
                e.printStackTrace()
            }

It is working without ssl as well. But i want to add ssl certificate while making web service call.

I have put my ssl cert in raw folder. Now how can i call my web service with my ssl cert ?

来源:https://stackoverflow.com/questions/62006180/how-can-i-attach-ssl-cert-with-ksoap2-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!