我使用cxf wsdl2java生成了java类。但不确定如何使用客户端证书对请求进行身份验证。通过使用以下命令,我能够从wsdl生成客户端类,没有任何问题:
wsdl2java -ant - client -d D:\cxf-client D:\HelperActions.wsdl
我在谷歌搜索中获得了具有用户ID和密码身份验证的博客或论坛。但无法找到如何使用jks或.crt证书对请求进行身份验证。
我尝试了以下链接中提到的内容
我也尝试实施以下链接中提到的认证
但我收到以下异常
javax.xml.ws.webserviceException:org.apache.cxf.service.factory.ServiceConstructionException:无法创建服务
引起:javax.wsdl.WSDLException:WSDLException:faultCode = PARSER_ERROR:解析问题' wsdl路径'。:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建failes:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径
引起:javax.net.ssl.HandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径
引起:sun.security.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径。
引起:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径
我将证书放在类路径中,我尝试了上述链接中提到的两种方法,但所有的努力都没有奏效。我不知道我哪里出错了。
有人可以帮我发送带有客户证书的请求吗?