camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to implement requestTimeout in the spring-ws component
Date Thu, 09 Feb 2012 16:12:45 GMT
Hi

If possible it would be nice to setup timeout options on the
camel-spring-ws out of the box. Without having to resort to custom WS
templates.
We do this for camel-http, camel-http4 and other components.



On Thu, Feb 9, 2012 at 3:38 PM, Babak Vahdat
<babak.vahdat@swissonline.ch> wrote:
> Hi,
>
> I haven't tried it by myself but I think the following should do the trick:
>
> Define your own dedicated WebServiceTemplate inside your spring
> Configuration which makes use of commons HttpClient [1] which
> on it's turn provides the possibility to specify a timeout (see [2] & [3])
> and then reference that WebServiceTemplate
> using the # notation [4] when you do invoke. And using the onException()
> Clause you could react when timeout happens:
>
> onException(java.net.SocketTimeoutException)...
>
> [1]
> http://static.springsource.org/spring-ws/site/reference/html/client.html#client-transports
> [2]
> http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpConnectionParams.html#setSoTimeout%28int%29
> [3]
> http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpConnection.html
> [4] http://camel.apache.org/spring-web-services.html
>
> Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-implement-requestTimeout-in-the-spring-ws-component-tp5469281p5469610.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message