wood burning stoves 2.0*
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
Author

Error in Calling Web service Through SSL

Nilu Deshmukh
Greenhorn

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
Greenhorn

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
    
    1
Hi!
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: http://faq.javaranch.com/content/Exam-Objectives-5.pdf
Take a look at section 8.3. Hope this is of any help!
Best wishes!
Nilu Deshmukh
Greenhorn

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
Greenhorn

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
Greenhorn

Joined: Apr 25, 2011
Posts: 2
I found some resource in http://www.longhowl.com/howls/144
Jitao Liu
Greenhorn

Joined: Nov 21, 2012
Posts: 1
I think that: I got the final solution to this issue:

Properties p = System.getProperties();
System.getProperties().put("javax.net.ssl.trustStore", "C:/Documents and Settings/rc3570/.keystore");
System.getProperties().put("javax.net.ssl.trustStorePassword", "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");
System.out.println(welcomeTest.getWelcomeTestStringWithName("jitao"));

Note: before build the client, need to create ./keystore
 
wood burning stoves
 
subject: Error in Calling Web service Through SSL