I have created a web service client using spring ws template. This is working as expected for http protocol. Now I want to make it work with https. I have the relevant client key store(the jks file) and now I want to configure the message sender to send secure request. Could you please help me on how to proceed on this?
Here is my spring bean configuration:
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>
<bean id="tokenrMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="contextPath" value="com.token.dto.v1" />
</bean>
<bean id="tokenServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
<constructor-arg ref="messageFactory" />
<property name="marshaller" ref="tokenrMarshaller"></property>
<property name="unmarshaller" ref="tokenrMarshaller"></property>
<property name="messageSender">
<bean class="org.springframework.ws.transport.http.HttpComponentsMessageSender" />
</property>
<property name="defaultUri" value="${token.url}" />
</bean>
If I change the url from http to https w/o any configuration, the application throws "org.springframework.ws.client.WebServiceTransportException".