配置 Tomcat 通过 SSL 使用 Web 服务

发布于 2024-08-08 22:22:57 字数 297 浏览 5 评论 0 原文

应采取哪些步骤通过 SSL 使用远程服务器上的 Web 服务?该应用程序是一个使用 Axis WS Framework 在 Tomcat 6 上运行的 Java 应用程序。

我知道例如 http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html,但是似乎主要描述了如何配置服务器以接受 SSL 请求。

Which steps should be taken to consume a web service on a remote server over SSL? The application is a Java application using Axis WS Framework running on Tomcat 6.

I'm aware of e.g. the instruction on http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html, which, however seem to mainly describe how to configure the server to accept SSL requests.

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

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

发布评论

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

评论(2

淡莣 2024-08-15 22:22:57

对于客户端连接,它就像任何其他 Java 应用程序的 SSL 一样。事实上它在 Tomcat 中运行并没有什么区别。

您需要为 Web 服务指定正确的“https:”端点。如果生成 Web 服务客户端 API 时这不是 WSDL 中的默认值,则可以使用采用 URL 参数的备用构造函数。

如果您正在访问的 Web 服务没有由运行时已识别的“真实”颁发机构颁发的证书,则您需要指定信任存储。最简单的方法是通过 启动应用程序时添加“javax.net.ssl.trustStore”系统属性

For client connections, it's just like SSL for any other Java application. The fact that it's running in Tomcat doesn't make a difference.

You'll need to specify the correct "https:" endpoint for the web service. If this wasn't the default in the WSDL when you generated the web service client API, you can use an alternate constructor that takes a URL parameter.

If the web service you are accessing doesn't have a certificate issued by a "real" authority that's already recognized by the runtime, you'll need to specify a trust store. The easiest way to do this is by adding the "javax.net.ssl.trustStore" system property when launching the application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文