File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes SSLHandshakeException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "SSLHandshakeException" Watch "SSLHandshakeException" New topic


Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

I have a web service wsdl given by some third party and I am trying to create a axis web service consumer java program to access this web service. I imported the certificate to my client trusted store but when I run the client I am getting below exception. What am I missing here :

Exception in thread "main" AxisFault
faultCode: {}Server.userException
faultString: No trusted certificate found
{} No trusted certificate found
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)

RR Kumaran
SCJP 1.4
Saurabh Rai

Joined: Oct 07, 2004
Posts: 15

I am facing exactly same problem while using axis .......

Any one having solution for the same...................

~Saurabh Rai<br />==================<br />SCJP, SCBCD, OCP 9i-DBA, OCP-PL/SQL
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548

Can you please explain what is that you are trying to achieve. I didnt resolve this issue however I guess the reason is the service provider is expecting a soap message which is signed using xml signatures and also there is digital certificates enabled and the client need to identify itself by providing its certificat to the web service provider. Please let me know your views ...
Alex Beekman

Joined: Dec 22, 2004
Posts: 9
Did you create a local certificate on the client machine?

Use the keytool.exe in the JDK to create a .keystore file.

Then in your java code set
System.setProperty("", "/folderA/.keystore);
System.setProperty("", "abcdefg");

before invoking the call.
[ January 05, 2005: Message edited by: Alex Beekman ]
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi Casan,

Below are the entries %JAVA_HOME%\jre\lib\security\ file
and I am using java
version 1.4.2_04


When I run the commands "keytool -list" or "keytool -list -storetype
JKS" on my dos prompt I am getting below error :
keytool error: Invalid keystore format

And when I the command "keytool -list -storetype JCEKS" I am getting
below output :
Keystore type: JCEKS
Keystore provider: SunJCE
Your keystore contains 0 entries

There is some java file given by some third party (actually it is
dsig.SampleSign2 that comes bundled with IBM XML Security Suite) that
uses the below line in its code :
KeyStore keystore = KeyStore.getInstance("JKS");

And so in accordance with the above JKS keystore type used I want to
update the default .keystore with my newly generated certificate and
so when I apply the command

keytool -genkey -dname "CN=Doug Tidwell, OU=developerWorks, O=IBM,
L=Research Triangle Park, S=North Carolina, C=US"
-keypass changeit -storepass changeit -alias xss4j1

I am getting below error message :

keytool error: Invalid keystore format

Can anyone please help me. What am I doing wrong here ...

You reply has always been timely. Thank you.

What I want is to create a key pair and certifcate whose storetype is
JKS but not JCEKS (using keytool -storetype JKS option) in the default
keystore file (i.e.C:\Documents and Settings\117382\.keystore) and I
want to read this keystore programatically using KeyStore keystore =

Hope I am clear on my illustration ... Please help
Tasja Mango

Joined: Mar 03, 2004
Posts: 8

Alex Beekman

Joined: Dec 22, 2004
Posts: 9
If all you need to do is get the wsdl2java to create the client -
Save the WSDL xml to a local file and then run the client generator tool using the file and not a URL.
I agree. Here's the link:
subject: SSLHandshakeException
It's not a secret anymore!