Xfire+WebService “Discarding unexpected response: HTTP/1.1 100 Continue”错误解决
错误如下:
org.apache.commons.httpclient.HttpMethodBase writeRequest
信息: 100 (continue) read timeout. Resume sending the request
org.apache.commons.httpclient.HttpMethodBase readResponse
信息: Discarding unexpected response: HTTP/1.1 100 Continue
经网络查询得到可能解决办法:
点击打开链接
但是方法不知道如何使用,遂查找其他方法,终于解决Xfire默认的多次握手报错了。
方法来源如下:
点击打开链接
我的代码如下:
Service srvcModel = new ObjectServiceFactory().create(IQueryBAService.class);
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
IHelloWorldService hs = null;
try {hs = (IHelloWorldService) factory.create(srvcModel, "http://..url...");
} catch (MalformedURLException e) {e.printStackTrace();
}
Client client =Client.getInstance(hs);
client.setTimeout(20000);
//设置发送的超时限制,单位是毫秒;
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, String.valueOf(20000));
client.setProperty(CommonsHttpMessageSender.DISABLE_KEEP_ALIVE, "true");
client.setProperty(CommonsHttpMessageSender.DISABLE_EXPECT_CONTINUE, "true");
String res = hs.queryBA(queryConditionType, queryCondition);
return res;
Xfire+WebService “Discarding unexpected response: HTTP/1.1 100 Continue”错误解决相关推荐
- WebSocket——[Error during WebSocket handshake: Unexpected response code: 403]解决方案
问题描述 WebSocket connection to 'ws://localhost:8888/MetroCity/ws/endpointChat' failed: Error during We ...
- WebSocket——[Error during WebSocket handshake: Unexpected response code: 200]解决方案
问题描述 WebSocket connection to 'ws://localhost:8888/MetroCity/ws/endpointChat' failed: Error during We ...
- 【uniapp】Error during WebSocket handshake: Unexpected response code: 302
前言 使用uniapp创建WebSocket时发生错误:Error during WebSocket handshake: Unexpected response code: 302 分析 报302的 ...
- XFire WebService开发快速起步
XFire WebService开发快速起步 环境: XFire-1.2.6 JDK1.5 MyEclipse 6.5 Tomcat-5.5.27 Windows XP Professional简体中 ...
- SocketJs报错failed: Error during WebSocket handshake: Unexpected response code: 400
SocketJs报错failed: Error during WebSocket handshake: Unexpected response code: 400 问题出现在nginx的配置文件,需要 ...
- websocket handshake unexpected response code 404问题
Html页面websocket客户端出现websocket handshake unexpected response code 404问题,一般是地址错误.在new WebSocket()里需要带上 ...
- WebSocket connection to,Error during WebSocket handshake: Unexpected response code: 404
使用标准的JSR 356注解时,需要使用tomcat 8.x版本,如果使用tomcat 7.x的版本,则需要继承WebSocketServlet,否则会报WebSocket connection to ...
- LDAP unexpected response: 500
LDAP login fails with "unexpected response: 500" in OCP 3.11 after change of certificate i ...
- Error during WebSocket handshake: Unexpected response code: 404错误的解决
作者:朱金灿 来源:https://blog.csdn.net/clever101 本文操作环境是:64位Windows 10,eclipse Oxygen.2 Release (4.7.2). 在使 ...
最新文章
- Netty和JDK源码来看Netty的NIO和JDK的NIO有什么不同
- java compareto方法怎么排序的_深入理解Java中Comparable和Comparator排序
- ytu 1057: 输入两个整数,求他们相除的余数(带参的宏 + 模板函数 练习)
- 18春《c语言》在线作业3,18春福师《C++语言程序设计》在线作业二【参考答案】...
- 【BZOJ 1266】 [AHOI2006]上学路线route
- Python之精心整理的50道入门练手习题 | Python技能树征题
- SecureCRT也能和Xshell一样批量导入主机
- Linux程序之触摸,linux 触摸屏驱动编写
- 分析打开hdu 3335 (最小路径覆盖)
- so文件(1)简单的导出使用
- ITIL 4: 培训与认证
- 通信方式、通信接口、通信总线、通信协议的关系
- 聊聊Web 3为什么可以解决数据使用中存在的难题
- 计算机密码学论文,密码学论文写作范例论文
- 互联网金融项目数据分析
- 专用舆情监测服务公司,TOOM舆情监测公司排名全国
- 经典伴读_GOF设计模式_结构型模式
- FZOJβ #113 后缀平衡树
- 无需兑换码下载来自设备制造商的 HEVC 视频扩展
- unordered_mapunordered_set的应用以及底层实现(哈希表)
热门文章
- 电信smgp3.0短信发送问题
- 马里奥(附代码windows)
- 接口技术七段数码管c语言,031 实例7-七段数码管绘制
- HILDON手册(转载自CSDN)
- 第一次系统发版的过程(一)
- php微信公众号支付实例教程,PHP微信公众号支付教程(含图文)
- selenium被检测了怎么办?
- 开发微信小程序所需要的http服务器搭建
- WRDS卓越学者和沃顿研究数据与分析图书馆员会议在北京宾大沃顿中国中心举行:庆祝研究、思想领导力和全球合作方面的创新
- linux备份压缩tgz,linux关于解压和压缩命令 zip rar tar.gz tgz