在 IBM Websphere 应用服务器上实现 SSL、JAX-WS Web 服务

发布于 11-01 08:28 字数 1299 浏览 5 评论 0原文

我尝试让 SSL 在使用 IBM Websphere JAX-WS 运行时创建的 Web 服务上工作已有一段时间了,但无法以某种方式使其工作。

需要您的帮助来解决问题。

这些是我已采取的步骤。

它是一个简单的“添加数字”Web 服务,它将两个数字相加并返回输出。

我在 WAS 7.0 上部署了 Web 服务,

ws 的端点是 http://localhost:9080/WebServiceProject/ AddNumbersSvc/AddNumbersSvc.wsdl

为了配置 ssl,我采取了以下步骤:

在 WAS 管理控制台中,我转到:服务 -> 策略集 -> 应用程序策略集。我选择了默认的 WSHTTPS。复制它并将其重命名为 WS SSL Policy,我不更改其中的任何内容。 接下来,我转到“安全性”->“SSL 证书和密钥管理”->“密钥存储和证书” 我使用自签名证书创建了 ServerKeyStore,使用客户端公钥创建了 ServerTrustStore 然后,我进入安全->SSL证书和密钥管理-> SSL 配置和我创建了一个新的配置 WS SSL conf 将信任存储设置为 ServerTrustStore,将密钥存储设置为 ServerKeyStore 接下来,我进入 WS SSL conf 的 QOP 设置。在那里,我将客户端身份验证设置为必需,将协议设置为 ssl,其余均为默认设置。 然后,我转到“服务”->“策略集”->“通用提供商策略集绑定”。我选择了默认的 WSHTTPS。复制它并将其重命名为 WS SSL Binding。选择了它。比选择的 SSL 传输和选择 WS SSL conf 作为 SSL 设置 最后我去了服务->服务提供商。选择 AddNumbers 服务并应用 WS SSL 策略作为策略集,选择 WS SSL 绑定作为绑定。

现在,当我重申应用程序并尝试通过以下方式执行 ws 时 https://localhost:9080/WebServiceProject/AddNumbersSvc/AddNumbersSvc.wsdl

我得到了 404 :( 而且当我通过 SOAPUi 使用 http 触发 ws 时,我得到了响应,但没有使用 https。

现在请帮助我找出我做错了什么。

I am trying to make SSL work on a webservices created by using IBM Websphere JAX-WS runtime for quite a while now but am unable to make it work somehow.

Need your help in resolving the problem.

These are the steps I have taken.

Its a simple Add Numbers Web service which adds two numbers and returns the output.

I deployed the webservice on WAS 7.0

the endpoint for the ws is http://localhost:9080/WebServiceProject/AddNumbersSvc/AddNumbersSvc.wsdl

Than to configure the ssl I took the following steps:

In WAS admin console I went to: Services->Policy Sets->Application Policy Sets. Than I selected WSHTTPS default. copied it and rename it to WS SSL Policy, I dint chnage anything in it.
Next, I went to Security->SSl ceritificate and key management ->Key stores and certificates I created ServerKeyStore with a self signed certificate and ServerTrustStore with the client public key
Than, I went to Security->SSl ceritificate and key management -> SSL Configurations and I created a new configuration WS SSL conf set the trust store as ServerTrustStore and Keystore as ServerKeyStore
Next, I went to QOP setting of WS SSL conf. There I set client authentication as required , protocol as ssl and rest all default.
Than, I went to Services->Policy Sets->General provider policy set bindings. Than I selected WSHTTPS default. copied it and rename it to WS SSL Binding. seleced it. than selected SSL transport and selected WS SSL conf as SSL settings
Finally I went to Services->Service providers. selected AddNumbers service and apllied WS SSL Policy as policy set and WS SSL Binding as Binding.

Now when i restated the application and tried to execute the ws through
https://localhost:9080/WebServiceProject/AddNumbersSvc/AddNumbersSvc.wsdl

i got a 404 :( and also when i triggered the ws through SOAPUi with http i got the repsonse but not with https.

Now pls help me to figure out what i did wrong .

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

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

发布评论

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

评论(2

来日方长2024-11-08 08:28:35

您需要禁用 http 请求并启用 https,如下所示。

服务器->服务器类型 ->应用服务器>选择服务器>网络集装箱运输链。
禁用 WCInboundDefault。
启用 WCInboundDefaultSecure

You will need to disable http request and enable https as shown below.

Server -> Server Types -> Application servers > select the server > Web container transport chains.
Disable WCInboundDefault.
Enable WCInboundDefaultSecure

甜味拾荒者2024-11-08 08:28:35

Web 容器侦听 HTTP 和 HTTPS 的不同端口,

9080 是 HTTP 的默认端口,而 9443 是 HTTPS 的默认端口。

您拥有的 URL 正在尝试向非 SSL 端口发出 SSL 请求。

华泰
曼鲁

The Web Containers listens to different ports for HTTP and HTTPS

9080 is the default port for HTTP while 9443 is the default port for HTTPS.

The URL that you have is trying to make an SSL request to an non-SSL port.

HTH
Manglu

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