【发布时间】:2021-01-22 15:32:30
【问题描述】:
我可以通过浏览器访问 WSDL,但是当我尝试通过部署在本地计算机中的 java 应用程序访问相同的 WSDL 文件时,我遇到了以下证书错误。我正在使用 java 1.8
对于同一个问题,我在这里查看了很多答案,我几乎尝试了所有答案,但问题仍然存在。
到目前为止我做了什么
1- 我从 Chrome 导出证书,将其保存为 Base 64。
2- 将 cer 粘贴到我的 JDK 位置 C:\Program Files\Java\jdk1.8.0_171\jre\lib\security\mig_root.cer
3- 我运行了这个命令:keytool -import -alias cac -file "C:\Program Files\Java\jdk1.8.0_171\jre\lib\security\mig_root.cer" -keystore cacerts -storepass changeit
4- 重启我的机器。
5- 问题仍然存在。
错误
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.
【问题讨论】:
标签: java ssl certificate ssl-certificate