无法为 Exchange EWS 生成代理类:无法找到请求目标的有效证书路径

发布于 2024-10-12 10:13:55 字数 807 浏览 7 评论 0原文

我想为 EWS 生成代理类 (http ://msdn.microsoft.com/en-us/library/dd877045%28v=exchg.140%29.aspx)。

keytool -keystore t:\my.keystore -storepass password -import -trustcacerts -alias MY-CA -file t:\MY-CA.crt
keytool -keystore t:\my.keystore -storepass password -list
set VMARGS=-Djavax.net.debug=all
set VMARGS=%VMARGS% -Djavax.net.ssl.trustStore=t:\my.keystore -Djavax.net.ssl.trustStorePassword=password
wsimport https://mail.xxxx.co.jp/ews/Exchange.asmx

但我收到此错误消息:

[ERROR]
sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target

I want to generate a proxy class for EWS (http://msdn.microsoft.com/en-us/library/dd877045%28v=exchg.140%29.aspx).

keytool -keystore t:\my.keystore -storepass password -import -trustcacerts -alias MY-CA -file t:\MY-CA.crt
keytool -keystore t:\my.keystore -storepass password -list
set VMARGS=-Djavax.net.debug=all
set VMARGS=%VMARGS% -Djavax.net.ssl.trustStore=t:\my.keystore -Djavax.net.ssl.trustStorePassword=password
wsimport https://mail.xxxx.co.jp/ews/Exchange.asmx

But I get this error message:

[ERROR]
sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

单身情人 2024-10-19 10:13:55

尝试:

wsimport -Djavax.net.ssl.trustStore=t:\my.keystore https://mail.xxxx.co.jp/ews/Exchange.asmx

wsimport 似乎没有选择 VMARGS。

如果上述有效,则证明是结论性的。否则,问题是您将错误的 RootCA 添加到密钥库中,或者密钥库未被读取

Try:

wsimport -Djavax.net.ssl.trustStore=t:\my.keystore https://mail.xxxx.co.jp/ews/Exchange.asmx

It would appear that VMARGS is not being picked up by wsimport.

If the above works then proof conclusive. Otherwise the issue is either you have the wrong RootCA added to your keystore or the keystore is not being read

裂开嘴轻声笑有多痛 2024-10-19 10:13:55

我可以确认这对于 JDK1.6.0u29 仍然是一个问题

当运行以下命令时:

wsimport -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore https://url.com?wsdl -p com.test -s ./src

我收到以下错误:

unrecognized parameter -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore

但我找到了执行以下命令的解决方法:

java -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore -classpath C:\jdk160_29\lib\tools.jar com.sun.tools.internal.ws.WsImport https://ur.com?wsdl -p com.test -s ./src

I can confirm this is still an problem for JDK1.6.0u29

When running the following command:

wsimport -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore https://url.com?wsdl -p com.test -s ./src

I got the following error:

unrecognized parameter -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore

But I found a workaround to execute the following command:

java -Djavax.net.ssl.trustStore=c:\jdk160_29\.mykeystore -classpath C:\jdk160_29\lib\tools.jar com.sun.tools.internal.ws.WsImport https://ur.com?wsdl -p com.test -s ./src
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文