KSOAP2:如何使用HttpsTransportSE?
我正在开发一个 Android 应用程序来与需要 SSL 连接的 Web 服务进行通信。为此,我想使用 HttpsTransportSE,但我找不到有关如何使用该类的教程。 我正在尝试构建一个新实例,但我不确切知道必须传递给构造函数的信息。 我的一行代码:
HttpsTransportSE httpsTransport = new HttpsTransportSE("address", port, ??????, timeout);
应该在什么字符串???地方?
如果我换了???通过“”或 null,会发生 IOException。 我认为 ????应该是客户端证书。是这样吗? 有人有关于 HttpsTransportSE 的教程吗?有什么有用的链接吗?
I am developing a android app to communicate with an web service that requires an SSL connection. To do that, I want to use HttpsTransportSE, but I can't find tutorials about how to use that class.
I am trying to build a new instance, but I don't know exactly the info I must pass to the constructor.
A line of my code:
HttpsTransportSE httpsTransport = new HttpsTransportSE("address", port, ????, timeout);
What string should be at ???? place?
If I replace ???? by "" or null, an IOException occurs.
I think ???? should be the client certificate. Is that right?
Does anybody have a tutorial about HttpsTransportSE? Any useful link?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 HttpsTransportSE 的这段代码应该有所帮助:
所以点击 https://MyServer:8080/MyService
您致电:
This code from the HttpsTransportSE should help:
So to hit https://MyServer:8080/MyService
You call: