我们有一个 websphere 应用程序,它必须通过 https 连接到 web 服务。 Websphere Application Server 版本为 8.5.5
我们有服务的 wsdl,因此我们能够使用 eclipse 4.5 中的 JAX-WS 向导创建客户端。
SSL 连接需要接受服务器证书和使用客户端证书(私钥)进行身份验证。
我们的限制是 SSL 配置必须在应用程序级别,而不是在服务器级别。第一次,我们能够使用默认信任库和 keystore 中的相应证书配置服务器,但该配置未被接受。
因此我们创建了一个带有 keystore 的 SSL 配置,其中包括 Web 服务服务器的签名者证书和客户端的个人证书(带有私钥)。类型是 JKS。
我们假设我们必须以某种方式在应用程序 > 应用程序类型 > WebSphere 企业应用程序 > application_name> 管理模块 > module_name> Web 服务:客户端安全绑定(bind),但该列表为空:
目前,当我们尝试测试服务客户端时,我们得到异常:
exception: javax.xml.ws.soap.SOAPFaultException:
javax.net.ssl.SSLHandshakeException: General SSLEngine problem
最佳答案
您需要将 SSL 证书导入到 Web SPhere 信任库中,您可以从这里进行:
Security > SSL certificate and key management > Key stores and certificates > CellDefaultTrustStore > Signer certificates > Retrieve from port
或
您可以直接从以下位置上传证书:
SSL certificate and key management > Key stores and certificates > CellDefaultTrustStore > Signer certificates > Add signer certificate
希望这能解决您的问题。
关于ssl - 在应用程序级别的 WAS 中通过 HTTPS 配置 JAX-WS Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41247818/