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 Unable to call webservice over SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Unable to call webservice over SSL" Watch "Unable to call webservice over SSL" New topic

Unable to call webservice over SSL

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 547

Hello All,

We have a webservice that is deployed in our dev environment and a new certificate was installed for enabling SSL. I tried the URL in browser and I can access the service. But now I'm trying to access the service from a unit test. I added the server certificate to my local client truststore and added the trust store and password as system properties as given below

But when I run my test, I'm getting the exception

Is there anything I'm missing here. I could not understand much from this exception, except that it could not find the certification. But this certification is added to my client truststore without any issue. I can see that in the keystore.


Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
The certificate that you use with the web service has to be signed by a CA (certificate authority), either directly or indirectly.
The exception you see is because there is a failure to verify that a CA root certificate is in a certificate path starting with your certificate.
This article will tell you how to bypass this problem in a development environment:
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Unable to call webservice over SSL
It's not a secret anymore!