From fc04f2518152b260e907cc1bbbbbd148a686f3db Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 21 Feb 2016 17:48:17 +0100 Subject: [PATCH] SOAP: custom connection and read time out for client SOAP connections --- .../client/transport/http/CustomHttpRequestMessageSender.java | 4 ++++ .../spring-configuration/ws/client-spring-configuration.xml | 9 ++++++++- .../client/transport/http/CustomHttpRequestMessageSender.java | 4 ++++ .../spring-configuration/ws/client-spring-configuration.xml | 11 +++++++++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/SOAP/cxf/web-services-spring-cxf-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java b/SOAP/cxf/web-services-spring-cxf-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java index cf44220..3e63544 100644 --- a/SOAP/cxf/web-services-spring-cxf-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java +++ b/SOAP/cxf/web-services-spring-cxf-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java @@ -40,6 +40,10 @@ public class CustomHttpRequestMessageSender extends AbstractHttpWebServiceMessag public CustomHttpRequestMessageSender() { requestFactory = new SimpleClientHttpRequestFactory(); } + + public CustomHttpRequestMessageSender(ClientHttpRequestFactory requestFactory) { + this.requestFactory = requestFactory; + } @Override public WebServiceConnection createConnection(URI uri) throws IOException { diff --git a/SOAP/cxf/web-services-spring-cxf-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml b/SOAP/cxf/web-services-spring-cxf-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml index 7f6f1f3..cb926e7 100644 --- a/SOAP/cxf/web-services-spring-cxf-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml +++ b/SOAP/cxf/web-services-spring-cxf-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml @@ -6,6 +6,7 @@ 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 @@ -180,7 +181,13 @@ - + + + + + diff --git a/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java b/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java index cf44220..3e63544 100644 --- a/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java +++ b/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/java/de/spring/webservices/client/transport/http/CustomHttpRequestMessageSender.java @@ -40,6 +40,10 @@ public class CustomHttpRequestMessageSender extends AbstractHttpWebServiceMessag public CustomHttpRequestMessageSender() { requestFactory = new SimpleClientHttpRequestFactory(); } + + public CustomHttpRequestMessageSender(ClientHttpRequestFactory requestFactory) { + this.requestFactory = requestFactory; + } @Override public WebServiceConnection createConnection(URI uri) throws IOException { diff --git a/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml b/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml index 9358079..ff12bd2 100644 --- a/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml +++ b/SOAP/jaxb2/web-services-spring-jaxb2-client/src/main/resources/spring-configuration/ws/client-spring-configuration.xml @@ -6,7 +6,8 @@ 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 @@ -159,7 +160,13 @@ - + + + + + -- 2.1.4