Answer to the question: Howto use KSoap with SSL in J2SE the easy way.
Davide Inglima <[email protected]> Tue, 20 Apr 2004 13:13:30 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
I found it this morning, so I will share this with the mailing list :) I reckon with an aftertought that everything about this is trivial, but this information is well hidden inside the Java platform (and no first page link on Google reckon this), so that it may be difficult to find out (I only found out it by accident, and I was pondering to rewrite the HttpTransportSE class). If you have J2SE 1.4+, the Java Secure Socket Extension already allows you to use HTTPS without calling a different Instead of calling HttpTransportSE with a normal http url call it with an https url. So if you call "http://mysoapserver.com/soapservlet", call instead (for example) "https://mysoapserver.com:8443/soapservlet". I tested this on Tomcat 5, with a standard SSL config (I only gave a different keystore path and password), and the client jar was signed with a key from the same keystore. The client jar is then downloaded via Java Webstart, j2se/java webstart will allow you to connect to the server without any problem. See: http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#HTTPSSample http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html for further information on jsse, and http://ksoap.enhydra.org/software/downloads/addon/HttpTransportSE.java for the HttpTransportSE class (present both in ksoap-j2ee and ksoap-j2se jars). Please, blog this, link this post either on GMane or on the Enhydra website archives and spread the love for KSoap :) -- Davide Inglima - limaCAT mailto:[email protected]