在我的Wicket应用程序中,我希望用soap将数据发送到wsdl端点。为了实现这一点,我在Eclipse中创建了一个动态web项目(使用Axis2)。连接到端点时会出现错误。错误是:
导致: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX路径生成失败:javax.net.ssl.SSLHandshakeException无法找到被请求目标的有效证书路径
端点需要具有先发制人连接的用户名和密码。
这是我的密码:
Deliver deliver = new Deliver();
XmlDataList dataList = new XmlDataList();
dataList.addXmlData(XML);
deliver.setXmlDataList(dataList);
Stubstub = new Stub();
Authenticator basicAuthenticator = new HttpTransportProperties.Authenticator();
List<String> schemes= new ArrayList<String>();
authSchemes.add(Authenticator.BASIC);
basicAuthenticator.setAuthSchemes(schemes);
basicAuthenticator.setUsername("UName");
basicAuthenticator.setPassword("Pwd");
basicAuthenticator.setPreemptiveAuthentication(true);
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthenticator);
如何设置连接到wsdl (https)的抢占条件?有人能给我解释一下这是怎么回事吗?
谢谢!
发布于 2013-05-01 15:15:00
错误消息意味着您的终结点使用可能是自签名的证书。您必须将此证书添加到本地密钥存储库中,才能接受它。请参见以下问题:Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?
https://stackoverflow.com/questions/16320756
复制相似问题