简体   繁体   中英

Webservice timeout java web service

I have a webservice stub. I am setting the timeout for the stub like this. stub. getServiceClient().getOptions().setTimeOutInMilliSeconds(timeout * 1 * 1000);

But this doesnt work (ie the connection is alive even after the timeout period). Can you please tell me why is it so? Thanks in advance. :)

We implement the timeout for our webservice clients as follows

org.apache.axis2.client.Options options = stub._getServiceClient().getOptions();
options.setTimeOutInMilliSeconds(timeoutMillisLimit + 2500); 
stub._getServiceClient().setOptions(options);

Get the Options object, set the values, then set the Options object back on the stub,

我很确定这是进入WS的请求的超时时间...即30秒钟后放弃(如果您无法返回)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM