加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Xfire开发的webservice客户端超时问题解决

发布时间:2020-12-17 02:01:35 所属栏目:安全 来源:网络整理
导读:最近某电信ISAG升级后我们的客户端出现大量超时提示,并且下发很慢 [MeChannelGw]2010-06-10 06:00:05 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request [MeChannelGw]2010-06-10 06:00:08 (HttpMetho
最近某电信ISAG升级后我们的客户端出现大量超时提示,并且下发很慢
[MeChannelGw]2010-06-10 06:00:05 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request
[MeChannelGw]2010-06-10 06:00:08 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request
[MeChannelGw]2010-06-10 06:00:11 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request
[MeChannelGw]2010-06-10 06:00:14 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request
[MeChannelGw]2010-06-10 06:00:17 (HttpMethodBase.java:2102)-[INFO] Timer-1 - 100 (continue) read timeout. Resume sending the request
每隔3-4秒才下发一次数据。

曾以为是对方服务器问题,网络的问题等等,就是换台机器部署,还是会有这个问题。实际,上因为Xfire默认的机制下,会不断的去和服务端握手造成的。 调用下面的代码即可解决问题。

//----------
??HttpClientParams params = new HttpClientParams();
????????????params.setParameter(HttpClientParams.USE_EXPECT_CONTINUE,Boolean.FALSE);
????????????params.setParameter(HttpClientParams.CONNECTION_MANAGER_TIMEOUT,10*1000L);
????????????Client.getInstance(service).setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS,params);
//------

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读