轴客户端存根超时问题 [英] problem with axis client stub timeout

查看:46
本文介绍了轴客户端存根超时问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个使用 Web 服务连接远程服务器的应用程序.我编写了一个方法来 ping 函数来确定服务器是否在线(即它提供了可以使用主机访问的 Web 服务:端口).我正在执行一个简单的 web 服务,超时时间为 2 秒(在调用之前作为存根类中的一个选项可用).理想情况下,调用应该在 2 秒内返回,以便我确定服务器是启动还是关闭.但是在某些情况下,它需要的时间远远超过 2 秒.

I am writing an application which uses web services to connect a remote server.I have written a method to ping function to determine if the server is online or not(i.e. its providing the web services which can be accessed using host:port).I am executing a simple web service with a 2 sec timeout(available as an option in stub class before I make the call).Ideally the call should return within 2 seconds allowing me to ascertain whether the server is up or down.However in certain cases it takes far longer than 2 seconds.

谁能帮我弄清楚为什么会这样?有没有办法确保超时值得到遵守?

Can anyone help me figure out why this is happening?Is there a way to ensure that the timeout value is honored ?

谢谢,跌倒

推荐答案

不要使用默认的 http 发送器,切换到基于公共 http 客户端的发送器.详细信息在这里 - http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP - 同一页面还提供了有关如何设置各种超时的详细信息.

Don't use the default http sender, switch to commons http client based sender. Details are here - http://wiki.apache.org/ws/FrontPage/Axis/AxisCommonsHTTP - Same page has details on how to set various kinds of timeouts as well.

这篇关于轴客户端存根超时问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆