我从这段代码中得到肥皂响应
SOAPConnectionFactory sfc = SOAPConnectionFactory.newInstance();
SOAPConnection connection = sfc.createConnection();
SOAPMessage soapMessageResponse = connection.call(soapRequest, new URL(serviceLocation));
我怎样才能使它基于 SSL?
我知道如何SSLSocketFactory
通过SSLContext
提供我指定的密钥库来创建。
我怎样才能告诉SOAPConnection
班级SSLSocketFactory
or SSLContext
?这样我的通讯就可以得到保障。
我不想在系统属性或 xml 文件中设置密钥库。我正在使用 Websphere 7。
编辑:
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.ibm.ws.webservices.engine.soap.SOAPConnectionImpl.callJAXWSDispatch(SOAPConnectionImpl.java:416)
... 49 more
Caused by: javax.xml.soap.SOAPException: javax.xml.ws.WebServiceException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
at com.ibm.ws.webservices.engine.xmlsoap.saaj13only.SOAPConnectionJAXWS.call(SOAPConnectionJAXWS.java:72)
... 54 more
Caused by: javax.xml.ws.WebServiceException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem