<bean id="trustStore_sae_ssl" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}"/>
<property name="targetMethod" value="putAll" />
<property name="arguments">
<props>
<prop key="javax.net.ssl.trustStore">${javax.net.ssl.trustStore}</prop>
</props>
</property>
</bean>
<bean id="messageSender" class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
<property name="connectionTimeout" value="${connection.connectionTimeout}" /><property name="readTimeout" value="${connection.readTimeout}" />
<property name="maxTotalConnections" value="${connection.maxConnectionsPerHost.maxConnections}" />
</bean>
<bean id="sae_webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
<constructor-arg ref="messageFactory"/>
<property name="marshaller" ref="jaxbMarshaller_sae"/>
<property name="unmarshaller" ref="jaxbMarshaller_sae"/>
<property name="defaultUri" value="${getOrderCR.wsServer.URL}"/>
<property name="messageSender" ref="messageSender"/>
<property name="interceptors">
<list><ref local="wsSecurityInterceptor_sae"/></list>
</property>
</bean>
in WAS, error is "SSLSocketFactory.getDefault() is null"
The reason is
http://stackoverflow.com/questions/2776149/error-accessing-a-web-service-with-ssl
file = /sbcdata/WebSphere/AppServer/java/jre/lib/security/java.security
# Default JSSE socket factories
ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
# WebSphere socket factories (in cryptosf.jar)
ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory
There is no default()
So, write a bean, for example, MySSL.java
static{
Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl");
Security.setProperty("ssl.ServerSocketFactory.provider", "com.ibm.jsse2.SSLServerSocketFactoryImpl");
}
<bean class="MySSL"/>