gsoap client call blocks when the server is not available
Asked Answered
I

3

5

I am looking for a method to detect if the gsoap web service is available. Unfortunately when the service is offline then the client gsoap calls block for a long time. Setting the soap.recv_timeout and the soap.send_timeout to zero do not help.

Indaba answered 20/12, 2012 at 14:12 Comment(0)
T
8

This is a bit late, but I finally found (what I think is) a better answer by skulking through the source code (why they don't document this, I don't know):

Look for "soap.connect_timeout". When I set this to 3, it times-out after 3 seconds as expected when the web service is unavailable.

The above recv_timeout and send_timeout didn't work for me in the case of "service unavailable".

Tommi answered 9/10, 2013 at 13:29 Comment(0)
J
3

I'm pretty sure that by setting soap.recv_timeout and soap.send_timeout with 0 means NO TIMEOUT. Try set this variables with 1 (1 means 1 second).

Jaunitajaunt answered 21/1, 2013 at 13:41 Comment(0)
T
1

I came here looking for a solution to the same problem and recognized the erroneous part about setting recv_timeout to 0, but I had set it to 20 and still got no timeout, so I followed the second post and used connect_timeout, which did work as I intended.

Thingumajig answered 25/9, 2015 at 15:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.