KSOAP2: How to use HttpsTransportSE?

I am developing an Android application to communicate with a web service that requires an SSL connection. For this, I want to use HttpsTransportSE, but I can not find tutorials on how to use this class. I am trying to create a new instance, but I definitely do not know the information that I have to pass to the constructor. Line of my code:

HttpsTransportSE httpsTransport = new HttpsTransportSE ("address", port, ????, timeout);

What line should be on ???? a place?

If I replaced ???? by value "" or null, an IOException is thrown. I think???? There must be a client certificate. It is right? Does anyone have a tutorial about HttpsTransportSE? Any useful link?

+4
source share
1 answer

This code from HttpsTransportSE should help:

public HttpsTransportSE (String host, int port, String file, int timeout) { super(HttpsTransportSE.PROTOCOL + "://" + host + ":" + port + file); this.host = host; this.port = port; this.file = file; this.timeout = timeout; } 

To get to https: // MyServer: 8080 / MyService you call:

 HttpsTransportSE("MyServer", 8080, "/MyService", timeout); 
+12
source

All Articles