Well, there is an easier way to do this instead of changing the HttpsServiceConnectionSE. You can install a fake trust manager as described in http://groups.google.com/group/android-developers/browse_thread/thread/1ac2b851e07269ba/c7275f3b28ad8bbc?lnk=gst&q=certificate and then call allowAllSSL () before executing any SSL connection / call on ksoap2. It will register a new default HostnameVerifier and TrustManager. ksoap2, when it makes its SSL connection, will use by default, and it works like a charm.
You can also make a few more efforts for this, make it much safer and install certificates in the local trusted application application, I think. I was on a secure network and not afraid of man-in-the-middle attacks, so I just made the first one.
I found it necessary to use KeepAliveHttpsTransportSE, like this new KeepAliveHttpsTransportSE(host, port, file, timeout); . Parameters fall into the URL object, for example, to access the Jira installation it is something like new KeepAliveHttpsTransportSE("host.whatever", 443, "/rpc/soap/jirasoapservice-v2", 1000) .
Sometimes it is convenient if you are new to the technology or web service that you want to use to play with it in the J2SE environment, and not in the emulator or even on the device, but in the j2SE / ME library ksoap2 (KeepAlive) No HttpsTransportSE ( I used ksoap2-j2se-full-2.1.2.jar). What you can do is get the sources for the three classes HttpsTransportSE, KeepAliveHttpsTransportSE and HttpsServiceConnectionSE from the Android android Android android android and put them in your J2SE project and use them. It worked for me, and it became a performance improvement to get the first steps with an unknown and rather complicated web service.
Vedran
source share