I am able to access a WSDL via Browser but when I try to access the same WSDL file via java application deployed in my local machine I encounter the below certificate error. I am using java 1.8
I've gone through many answers here for the same issue and I tried almost all of them but still the issue persists.
What I've done so far
1- I exported the certificate from the Chrome, saved it as Base 64.
2- Paste the cer in my JDK location which is C:\Program Files\Java\jdk1.8.0_171\jre\lib\security\mig_root.cer
3- I ran this command: keytool -import -alias cac -file "C:\Program Files\Java\jdk1.8.0_171\jre\lib\security\mig_root.cer" -keystore cacerts -storepass changeit
4- Restart my machine.
5- Still issue persists.
Error
javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://myURL?WSDL. It failed with: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.