Announcement Announcement Module
Collapse
No announcement yet.
Spring WST acessing SSL portected SOAP service with Get request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WST acessing SSL portected SOAP service with Get request

    I'm trying to use Spring WebServiceTemplate to access a SOAP webservice. The service is protected by SSL so i've been trying to modify the template configuration to use a custom HttpClient configuration.

    Code:
    <bean id="exchangeWST" class="org.springframework.ws.client.core.WebServiceTemplate">
    		<constructor-arg ref="Marshaller" />
    		<property name="messageFactory" ref="messageFactory" />
    		<property name="messageSender" ref="fullAccessHttpClientMessageSender"/>
    		<property name="defaultUri" value="https://exchangeserver/EWS/Exchange.asmx" />
    	</bean>
    
    	<bean id="fullAccessHttpClientMessageSender"
    		class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
    		<constructor-arg type="org.apache.http.impl.client.DefaultHttpClient">
    			<ref bean="httpClient" />
    		</constructor-arg>
    	</bean>
    	
    	<bean id="httpClient" class="mypackage.HTTPClientFactory"
    		factory-method="getHTTPClient">
    	</bean>
    The problem occurs because CommonsHttpMessageSender expects org.apache.commons.httpclient.HttpClient however im passing in org.apache.http.impl.client.DefaultHttpClient although it does extend AbstractHttpClient which implements org.apache.http.client.HttpClient. When i start up the application it gives me a "Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)" error,


    Does Spring WST have other senders which offer more support for connecting to SSL SOAP service and sending GET requests or do i need to extend the CommonsHttpMessageSendder?
Working...
X