我得到这个代码SOAP响应
SOAPConnectionFactory sfc = SOAPConnectionFactory.newInstance();
SOAPConnection connection = sfc.createConnection();
SOAPMessage soapMessageResponse = connection.call(soapRequest, new URL(serviceLocation));
我怎样才能使它基于SSL的?
我知道如何创建SSLSocketFactory
距离SSLContext
给我指定的密钥库 。
我怎么能告诉SOAPConnection
类有关SSLSocketFactory
或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