0

I have generated client stub using wsdl2java. I am able to call webservices of HTTP server. But I have HTTPS server with self signed certificate. When I called same service for HTTPS server, its throwing exception : PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

How to modify client stub to accept all certificates?

prashant
  • 969
  • 3
  • 11
  • 22

1 Answers1

0

You have one of two options:

  1. Trust the cert. One possible approach is this: http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/

  2. Alternatively, choose to ignore the error and keep going. See this stackoverflow q: How to ignore PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException?

Google is your friend...

Community
  • 1
  • 1
Vivek
  • 428
  • 2
  • 13