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 Error in Calling Web service Through SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error in Calling Web service Through SSL" Watch "Error in Calling Web service Through SSL" New topic

Error in Calling Web service Through SSL

Nilu Deshmukh

Joined: Aug 03, 2009
Posts: 22
I am Trying to call a web service Client in my code but it gives following error

My Code is As follows
web service call ...

Nilu Deshmukh

Joined: Aug 03, 2009
Posts: 22
I searched through google and found that its issue in Certificate installation..
can any one tell me how to install a certificate in trustore.

Thanks in Advance..
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
I have a step-by-step guide on how to set up certificates for ordinary SSL and mutual authentication in my SCDJWS study notes, which you can find here:
Take a look at section 8.3. Hope this is of any help!
Best wishes!
Nilu Deshmukh

Joined: Aug 03, 2009
Posts: 22
Thanks For Yor Help.

I came to new the Problem. The Prblem is in Java keystore. JDK is not able to load the keystore. that why i can call the web service through browser https. but not through my code..

So Please Tell me how to load the certificat in JDK or do I need to set any Security Policy for my code....

Becase when I check the system Property through java code... it gives null.

Leonardo Rodriguez

Joined: Jan 13, 2010
Posts: 1
Hi, I run in this problem in an Jboss with some EARs previously deployed, after a lot of test I realize that the problem was the the System/ssl variables set by other EAR, so the fix is remove ssl properties before invoke Axis.

charles jones

Joined: Apr 25, 2011
Posts: 2
I found some resource in
Jitao Liu

Joined: Nov 21, 2012
Posts: 2

I think that: I got the final solution to this issue:

Properties p = System.getProperties();
System.getProperties().put("", "C:/Documents and Settings/rc3570/.keystore");
System.getProperties().put("", "password");
WelcomeTestImplServiceLocator welcomeTestImplServiceLocator = new WelcomeTestImplServiceLocator();
WelcomeTest welcomeTest = welcomeTestImplServiceLocator.getWelcomeTestImplPort();
// to use Basic HTTP Authentication:
((Stub)welcomeTest)._setProperty(Call.USERNAME_PROPERTY, "admin");
((Stub)welcomeTest)._setProperty(Call.PASSWORD_PROPERTY, "password");

Note: before build the client, need to create ./keystore

Best regards!
I agree. Here's the link:
subject: Error in Calling Web service Through SSL
It's not a secret anymore!