How to set timeout in Spring WebServiceTemplate
问题 I am using org.springframework.ws.client.core.WebServiceTemplate for making Web Service calls. How can i configure timeout for the call. 回答1: If you are using Spring Webservices 2.1.0 version, You can set timeout using HttpComponentsMessageSender. CommonsHttpMessageSender are deprecated and not recommended by Spring anymore. The way I have it implemented, I define my WebServiceTemplate to use HttpComponentsMessageSender. Values are in Milliseconds <bean id="webServiceTemplate" class="org