{"id":24774,"date":"2014-05-01T07:00:56","date_gmt":"2014-05-01T04:00:56","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=24774"},"modified":"2014-05-01T11:24:32","modified_gmt":"2014-05-01T08:24:32","slug":"spring-integration-configure-web-service-client-timeout","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html","title":{"rendered":"Spring Integration &#8211; Configure web service client timeout"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway, thus you just need to worry about building the request message and handling the response. However, with this approach it is not obvious how to configure additional options like setting timeouts or caching of operations. This article will show how to set a client timeout and integrate it with the gateway.<\/p>\n<p>This article is divided in the following sections:<\/p>\n<ol>\n<li>Introduction.<\/li>\n<li>Web service invocation overview.<\/li>\n<li>Configuring a message sender.<\/li>\n<li>The sample application.<\/li>\n<li>Conclusion.<\/li>\n<\/ol>\n<ul>\n<li>The source code can be found at <a href=\"https:\/\/github.com\/xpadro\/spring-integration\/tree\/master\/int-ws-timeout\" target=\"_blank\">github<\/a>.<\/li>\n<\/ul>\n<h2>Web service invocation overview<\/h2>\n<p>The web service outbound gateway delegates the web service invocation to the <a href=\"http:\/\/projects.spring.io\/spring-ws\/\" target=\"_blank\">Spring Web Services<\/a> <a href=\"http:\/\/docs.spring.io\/spring-ws\/sites\/2.0\/apidocs\/org\/springframework\/ws\/client\/core\/WebServiceTemplate.html\" target=\"_blank\">WebServiceTemplate<\/a>. When a message arrives to the outbound gateway, this template uses a message sender in order to create a new connection. The diagram below shows an overview of the flow:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/int-timeout-sequence.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-24838\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/int-timeout-sequence.png\" alt=\"int-timeout-sequence\" width=\"640\" height=\"248\" \/><\/a><\/p>\n<p>By default, the web service template sets an <a href=\"http:\/\/docs.spring.io\/spring-ws\/sites\/2.0\/apidocs\/org\/springframework\/ws\/transport\/http\/HttpUrlConnectionMessageSender.html\" target=\"_blank\">HttpUrlConnectionMessageSender<\/a> as its message sender, which is a basic implementation without support for configuration options. This behavior though, can be overridden by setting a more advanced message sender with the capability of setting both read and connection timeouts.<\/p>\n<p>We are going to configure the message sender in the next section.<\/p>\n<h2>Configuring a message sender<\/h2>\n<p>We are going to configure a message sender to the outbound gateway. This way, the gateway will set the template\u2019s message sender with the one provided.<\/p>\n<p>The implementation we are providing in the example is the <a href=\"http:\/\/docs.spring.io\/spring-ws\/sites\/2.0\/apidocs\/org\/springframework\/ws\/transport\/http\/HttpComponentsMessageSender.html\" target=\"_blank\">HttpComponentsMessageSender<\/a> class, also from the Spring Web Services project. This message sender allows us to define the following timeouts:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ul>\n<li><b>connectionTimeout<\/b>: Sets the timeout until the connection is established.<\/li>\n<li><b>readTimeout<\/b>: Sets the socket timeout for the underlying HttpClient. This is the time required for the service to reply.<\/li>\n<\/ul>\n<p>Configuration:<\/p>\n<pre class=\"brush:xml\">&lt;bean id=\"messageSender\" class=\"org.springframework.ws.transport.http.HttpComponentsMessageSender\"&gt;\r\n    &lt;property name=\"connectionTimeout\" value=\"${timeout.connection}\"\/&gt;\r\n    &lt;property name=\"readTimeout\" value=\"${timeout.read}\"\/&gt;\r\n&lt;\/bean&gt;<\/pre>\n<p>The properties file contains the values, which are both set to two seconds:<\/p>\n<p>timeout.connection=2000<\/p>\n<p>timeout.read=2000<\/p>\n<p>Once configured, we add it to the web service outbound gateway configuration:<\/p>\n<pre class=\"brush:xml\">&lt;int-ws:outbound-gateway uri=\"http:\/\/localhost:8080\/spring-ws-courses\/courses\" \r\n    marshaller=\"marshaller\" unmarshaller=\"marshaller\" \r\n    request-channel=\"requestChannel\" message-sender=\"messageSender\"\/&gt;<\/pre>\n<p>To use this message sender, you will need to add the following dependency:<\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.httpcomponents&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;httpclient&lt;\/artifactId&gt;\r\n    &lt;version&gt;4.3.3&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p>And that\u2019s it; the next section will show the sample application to see how it works.<\/p>\n<h2>The sample application<\/h2>\n<p>The flow is simple; it consists in an application that sends a request to a web service and receives a response. The web service source code can be found at <a href=\"https:\/\/github.com\/xpadro\/spring-samples\/tree\/master\/spring-ws-courses\" target=\"_blank\">github<\/a>.<\/p>\n<pre class=\"brush:xml wrap-lines:false\">&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n    xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xmlns:context=\"http:\/\/www.springframework.org\/schema\/context\"\r\n    xmlns:int=\"http:\/\/www.springframework.org\/schema\/integration\"\r\n    xmlns:int-ws=\"http:\/\/www.springframework.org\/schema\/integration\/ws\"\r\n    xmlns:oxm=\"http:\/\/www.springframework.org\/schema\/oxm\"\r\n    xsi:schemaLocation=\"\r\n        http:\/\/www.springframework.org\/schema\/beans http:\/\/www.springframework.org\/schema\/beans\/spring-beans-3.0.xsd\r\n        http:\/\/www.springframework.org\/schema\/context http:\/\/www.springframework.org\/schema\/context\/spring-context-3.0.xsd\r\n        http:\/\/www.springframework.org\/schema\/integration http:\/\/www.springframework.org\/schema\/integration\/spring-integration.xsd\r\n        http:\/\/www.springframework.org\/schema\/integration\/ws http:\/\/www.springframework.org\/schema\/integration\/ws\/spring-integration-ws.xsd\r\n        http:\/\/www.springframework.org\/schema\/oxm http:\/\/www.springframework.org\/schema\/oxm\/spring-oxm-3.0.xsd\"&gt;\r\n    \r\n    &lt;context:component-scan base-package=\"xpadro.spring.integration.ws\"\/&gt;\r\n    &lt;context:property-placeholder location=\"classpath:props\/service.properties\"\/&gt;\r\n    \r\n    &lt;!-- System entry --&gt;\r\n    &lt;int:gateway id=\"systemEntry\" default-request-channel=\"requestChannel\" \r\n        service-interface=\"xpadro.spring.integration.ws.gateway.CourseService\"\/&gt;\r\n    \r\n    &lt;!-- Web service invocation --&gt;\r\n    &lt;int-ws:outbound-gateway uri=\"http:\/\/localhost:8080\/spring-ws-courses\/courses\" \r\n            marshaller=\"marshaller\" unmarshaller=\"marshaller\" \r\n            request-channel=\"requestChannel\" message-sender=\"messageSender\"\/&gt;\r\n    \r\n    &lt;oxm:jaxb2-marshaller id=\"marshaller\" contextPath=\"xpadro.spring.integration.ws.types\" \/&gt;\r\n    \r\n    &lt;bean id=\"messageSender\" class=\"org.springframework.ws.transport.http.HttpComponentsMessageSender\"&gt;\r\n        &lt;property name=\"connectionTimeout\" value=\"${timeout.connection}\"\/&gt;\r\n        &lt;property name=\"readTimeout\" value=\"${timeout.read}\"\/&gt;\r\n    &lt;\/bean&gt;\r\n\r\n&lt;\/beans&gt;<\/pre>\n<p>The gateway contains the method through which we will enter the messaging system:<\/p>\n<pre class=\"brush:java\">public interface CourseService {\r\n    \r\n    @Gateway\r\n    GetCourseResponse getCourse(GetCourseRequest request);\r\n}<\/pre>\n<p>Finally, the test:<\/p>\n<pre class=\"brush:java\">@ContextConfiguration(locations = {\"\/xpadro\/spring\/integration\/ws\/config\/int-course-config.xml\"})\r\n@RunWith(SpringJUnit4ClassRunner.class)\r\npublic class TestIntegrationApp {\r\n    \r\n    @Autowired\r\n    private CourseService service;\r\n    \r\n    @Test\r\n    public void invokeNormalOperation() {\r\n        GetCourseRequest request = new GetCourseRequest();\r\n        request.setCourseId(\"BC-45\");\r\n        \r\n        GetCourseResponse response = service.getCourse(request);\r\n        assertNotNull(response);\r\n        assertEquals(\"Introduction to Java\", response.getName());\r\n    }\r\n    \r\n    @Test\r\n    public void invokeTimeoutOperation() {\r\n        try {\r\n            GetCourseRequest request = new GetCourseRequest();\r\n            request.setCourseId(\"DF-21\");\r\n            \r\n            GetCourseResponse response = service.getCourse(request);\r\n            assertNull(response);\r\n        } catch (WebServiceIOException e) {\r\n            assertTrue(e.getCause() instanceof SocketTimeoutException);\r\n        }\r\n    }\r\n}<\/pre>\n<h2>Conclusion<\/h2>\n<p>We have learnt how to set additional options to the web service outbound gateway in order to establish a timeout. In the next post, I will explain how to cache this invocation.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/xpadro.blogspot.com\/2014\/04\/spring-integration-configure-web.html\">Spring Integration &#8211; Configure web service client timeout<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Xavier Padro at the <a href=\"http:\/\/xpadro.blogspot.com\/\">Xavier Padr\u00f3&#8217;s Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway, thus you just need to worry about building the request message and handling the response. However, with this approach it is not obvious how to configure additional &hellip;<\/p>\n","protected":false},"author":533,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,410],"class_list":["post-24774","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-integration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Integration - Configure web service client timeout<\/title>\n<meta name=\"description\" content=\"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Integration - Configure web service client timeout\" \/>\n<meta property=\"og:description\" content=\"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-01T04:00:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-05-01T08:24:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Xavier Padro\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/xavips\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Xavier Padro\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html\"},\"author\":{\"name\":\"Xavier Padro\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5443fbc8fb815652f181942d4622090d\"},\"headline\":\"Spring Integration &#8211; Configure web service client timeout\",\"datePublished\":\"2014-05-01T04:00:56+00:00\",\"dateModified\":\"2014-05-01T08:24:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html\"},\"wordCount\":477,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring Integration\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html\",\"name\":\"Spring Integration - Configure web service client timeout\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2014-05-01T04:00:56+00:00\",\"dateModified\":\"2014-05-01T08:24:32+00:00\",\"description\":\"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-integration-configure-web-service-client-timeout.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Integration &#8211; Configure web service client timeout\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5443fbc8fb815652f181942d4622090d\",\"name\":\"Xavier Padro\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g\",\"caption\":\"Xavier Padro\"},\"description\":\"Xavier is a software developer working in a consulting firm based in Barcelona. He is specialized in web application development with experience in both frontend and backend. He is interested in everything related to Java and the Spring framework.\",\"sameAs\":[\"http:\\\/\\\/xpadro.blogspot.gr\\\/\",\"http:\\\/\\\/linkedin.com\\\/pub\\\/xavier-padro-sobrepera\\\/1a\\\/64\\\/3\\\/en\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/xavips\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/xavier-padro\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Integration - Configure web service client timeout","description":"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html","og_locale":"en_US","og_type":"article","og_title":"Spring Integration - Configure web service client timeout","og_description":"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is","og_url":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-05-01T04:00:56+00:00","article_modified_time":"2014-05-01T08:24:32+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Xavier Padro","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/xavips","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Xavier Padro","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html"},"author":{"name":"Xavier Padro","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5443fbc8fb815652f181942d4622090d"},"headline":"Spring Integration &#8211; Configure web service client timeout","datePublished":"2014-05-01T04:00:56+00:00","dateModified":"2014-05-01T08:24:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html"},"wordCount":477,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring Integration"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html","url":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html","name":"Spring Integration - Configure web service client timeout","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2014-05-01T04:00:56+00:00","dateModified":"2014-05-01T08:24:32+00:00","description":"Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-integration-configure-web-service-client-timeout.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Integration &#8211; Configure web service client timeout"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5443fbc8fb815652f181942d4622090d","name":"Xavier Padro","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bbf0579a188773b88762d54dadc779b2cd17ddb261d809956ed55d8569bd7ca2?s=96&d=mm&r=g","caption":"Xavier Padro"},"description":"Xavier is a software developer working in a consulting firm based in Barcelona. He is specialized in web application development with experience in both frontend and backend. He is interested in everything related to Java and the Spring framework.","sameAs":["http:\/\/xpadro.blogspot.gr\/","http:\/\/linkedin.com\/pub\/xavier-padro-sobrepera\/1a\/64\/3\/en","https:\/\/x.com\/https:\/\/twitter.com\/xavips"],"url":"https:\/\/www.javacodegeeks.com\/author\/xavier-padro"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/24774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/533"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=24774"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/24774\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=24774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=24774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=24774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}