Axis2 ServiceClient options ignore timeout

强颜欢笑 提交于 2019-12-04 11:50:31

I was able to resolve the issue (although it looks somehow duplicated to me)

int timeOutInMilliSeconds = 2000;
options.setTimeOutInMilliSeconds(timeOutInMilliSeconds);
options.setProperty(HTTPConstants.SO_TIMEOUT, timeOutInMilliSeconds);
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, timeOutInMilliSeconds);

Sebastian

user2651178

Per API doc of Axis2 1.6.3, it is either the two properties or the timeOutInMillis like :

Options options = new Options();
options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeOutInMilliSeconds));
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeOutInMilliSeconds));

OR

options.setTimeOutInMilliSeconds(timeOutInMilliSeconds);

SOURCE: http://axis.apache.org/axis2/java/core/docs/http-transport.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!