public CustomHttpRequestMessageSender() {
requestFactory = new SimpleClientHttpRequestFactory();
}
+
+ public CustomHttpRequestMessageSender(ClientHttpRequestFactory requestFactory) {
+ this.requestFactory = requestFactory;
+ }
@Override
public WebServiceConnection createConnection(URI uri) throws IOException {
xmlns:oxm="http://www.springframework.org/schema/oxm"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
<property name="messageSenders">
<list>
- <bean class="de.spring.webservices.client.transport.http.CustomHttpRequestMessageSender" />
+ <bean class="de.spring.webservices.client.transport.http.CustomHttpRequestMessageSender">
+ <constructor-arg>
+ <bean class="org.springframework.http.client.SimpleClientHttpRequestFactory"
+ p:readTimeout="2000"
+ p:connectTimeout="1000" />
+ </constructor-arg>
+ </bean>
</list>
</property>
</bean>
public CustomHttpRequestMessageSender() {
requestFactory = new SimpleClientHttpRequestFactory();
}
+
+ public CustomHttpRequestMessageSender(ClientHttpRequestFactory requestFactory) {
+ this.requestFactory = requestFactory;
+ }
@Override
public WebServiceConnection createConnection(URI uri) throws IOException {
xmlns:oxm="http://www.springframework.org/schema/oxm"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
-
+ xmlns:p="http://www.springframework.org/schema/p"
+
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
<property name="messageSenders">
<list>
- <bean class="de.spring.webservices.client.transport.http.CustomHttpRequestMessageSender" />
+ <bean class="de.spring.webservices.client.transport.http.CustomHttpRequestMessageSender">
+ <constructor-arg>
+ <bean class="org.springframework.http.client.SimpleClientHttpRequestFactory"
+ p:readTimeout="2000"
+ p:connectTimeout="1000" />
+ </constructor-arg>
+ </bean>
</list>
</property>
</bean>