Hi Nuno,
If the server has a CA issued cert then you don't need anything. In case of
self signed cert I add the following two line and it works for me. I usually
don't import my self-signed cert to the java cacerts.
System.setProperty("javax.net.ssl.trustStore",
"C:/cts/axis2/client/resources/server.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "******");
Hope this helps.
Thanks
Sanjay
-----Original Message-----
From: Nuno Feliciano [mailto:[email protected]]
Sent: Thursday, May 07, 2009 10:08 AM
To: [email protected]
Subject: https client - defining the keystore path
Hi,
I'm trying to use an axis client to consume an https webservice.
I set the following properties
System.setProperty("axis.socketSecureFactory",
"org.apache.axis.components.net.SunJSSESocketFactory");
System.setProperty("javax.net.ssl.keyStore", "C:\\Program
Files\\Java\\jdk1.5.0_14\\.keystore");
System.setProperty("javax.net.ssl.passwordStore", "");
System.setProperty("javax.net.ssl.trustStore", "C:\\Program
Files\\Java\\jdk1.5.0_14\\jre\\lib\\security\\cacerts");
But axis complains because it can't find the keystore file in my user.home
java.io.FileNotFoundException: D:\Documents and Settings\<user>\.keystore (The
system cannot find the file specified)
I thought the purpose of setting the "javax.net.ssl.keyStore" property was to
tell axis not to look in the default place for the keystore, so why is it
looking in my user.home folder, and how can I change that?