yaronn / ws.js

A WS-* client stack for node.js. Written in pure javascript!
http://webservices20.blogspot.com/
103 stars 64 forks source link

Time Out for SOAP Client #31

Open alpeshrpatel opened 8 years ago

alpeshrpatel commented 8 years ago

Hey,

We are consuming SOAP end-point and some of end-point are taking more time to response.

If you have any option for setting up time out . Please reply me ASAP.

Rgds, Alpesh

yaronn commented 8 years ago

if the endpoint does answer at the end (connection is not stack) then this does not seem an issue with ws.js. try calling the endpoint with curl (or a c# client) and you will probably get the same results.

yaronn commented 8 years ago

ok now I understand you ask how to configure a timeout. ws.js does not expose this setting, but ws.js uses the 'request' module which should support this setting, in which case you can change ws.js code here:

https://github.com/yaronn/ws.js/blob/master/lib/handlers/client/http.js

just maybe you can do it without changing the ws.js code bu requiring 'request' in your code before you require ws.js, which should give the effect of default setting to all of the requests, but not sure about it.