How to access web services over HTTPS
In order to access https web service, you have to install the certificates on the emulator/device
This process involves several steps.
In FireFox (with the https page opened). The process shows  as an example:
- Double-click on the lock symbol (right bottom, at least on my machine) | Security tab | View Certificate | Details tab
- Click on kenai.com in the Certificate Hierarchy
- Click the Export Button
- Choose X509 certificate (PEM), type in the name, for instance kenai.
- Repeat for Sun and Verisign as well
The certificates are stored as kenai.crt, sun.crt, verisign.crt (for export to the device, .cer extension might be better)
In the command like (Windows):
c:\jdk1.6\bin\keytool -importcert -keystore kenai.jks -storepass changeit -alias kenai -file kenai.crt
- If you don't use the storepass argument, you have to provide a password
- Repeat for sun (-alias sun) and verisign
keytool -list kenai.jks -storepass changeit to verify the content
Next step is also in the command line:
- Find the j2me keystore, usually under
- Import the key to the j2me keystore - on my machine it looks like this:
netbeans\javafx2\javafx-sdk\emulator\bin\mekeytool.exe -import -MEkeystore "C:\Documents and Settings\mr97946\javafx-sdk\1.2-b31\work\0\appdb\_main.ks" -keystore c:\tmp\kenai.jks -storepass changeit -alias kenaiNote that _main.ks is the correct file name.
- Repeat for Sun and verisign
In the emulator:
- With the emulator running, click Application in the emulator toolbar | AMS Home | double click on Manage Certificate Authorities
- Check if all certificates have been installed (at least in my environment, there are two certificates by default, should be 5 if you are successful)
Windows Mobile Device
In Firefox, save the certificates as .cer files. Copy the .cer files over to the device. In the file manager, just click on the files and they get added to the device certificate store. Kenai and Sun certifcates should be enough.
You can verify the certificates have been added in Start | Settings | System | Certificates | Intermediate tab