• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to HTTPS webservice (through oracle- OC4J Jdeveloper)

 
Will Kwee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having issues while trying to connect to a webservice that require SSL. Has anybody seen similar exception below or any suggestion of how to setup the cert (using the DER X.509 since the PKCS #12 format not supported)?

WARNING: Unable to connect to URL: https://itsolutions/AppIntegration/org/test/sendRequest.jpd due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 
D Algger
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen this.

What you need to do is provide a keystore with the target server's SSL certificate.

Then you need to make your program aware of it. Here is how I did it:

File kstore = new File("./security/sslStore.jks");
boolean exists = kstore.exists();
if(!exists) {
throw new mypkg.KeyStoreNotFoundException(kstore.getName());
}

System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
System.setProperty("javax.net.ssl.trustStorePassword", "password");


After that, the system will be able to verify the target server's SSL cert.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"If Only",
Please check your private messages regarding an important administrative matter.
-Ben
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic