WebService报org.apache.cxf.interceptor.Fault: Could not send Message 错误
来源:互联网 发布:美国人工智能政策 编辑:程序博客网 时间:2024/06/05 16:25
问题描述
在项目中编程发现,原来WebService能够正常返回结果,但是后续改变查询条件,导致服务端检索时间过长,客户端抛出:org.apache.cxf.interceptor.Fault: Could not send Message 错误。
解决方案
在客户端延长超时时间,代码如下:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(IEvalService.class);//注册WebService接口 factory.setAddress(CoreConst.PATENT_URL);//设置WebService地址 factory.getOutInterceptors().add(new ClientLoginInterceptor(CoreConst.PARENT_USERNAME,CoreConst.PARENT_PASSWORD)); IEvalService client = (IEvalService)factory.create();//客户端对象 //设置客户端的配置信息,超时等. Client proxy = ClientProxy.getClient(client); HTTPConduit conduit = (HTTPConduit) proxy.getConduit(); HTTPClientPolicy policy = new HTTPClientPolicy(); policy.setConnectionTimeout(30000); //连接超时时间 policy.setReceiveTimeout(180000);//请求超时时间. conduit.setClient(policy); ResultData info = client.loadDataFromSearch(pa,ipc, api_key, sign);//调用服务
如上,设置请求超时时间为3分钟,能正常返回结果了。
阅读全文
0 0
- WebService报org.apache.cxf.interceptor.Fault: Could not send Message 错误
- WebService报org.apache.cxf.interceptor.Fault: Could not send Message 错误
- org.apache.cxf.interceptor.Fault:Could not send Message
- cxf未开启服务端时产生的报错org.apache.cxf.interceptor.Fault: Could not send Message.
- org.apache.cxf.interceptor.Fault: Could not send Message.(CXF客户端访问服务器端出错)
- org.apache.cxf.interceptor.Fault: Could not initialize class org.springframework.jdbc.core.Statement
- WebService报错:org.apache.cxf.interceptor.Fault: No such operation
- WebService放发布服务之后访问报错org.apache.cxf.interceptor.Fault: No such operation:
- org.apache.cxf.interceptor.Fault
- org.apache.cxf.interceptor.Fault: Unmarshalling Error错误解决方案
- cxf的webservice的Could not send Message
- org.apache.cxf.interceptor.Fault: Could not start Jetty server on port 8,888: Cannot assign requeste
- org.apache.cxf.interceptor.Fault: Unmarshalling Error:
- cxf /webservice出错 org.apache.cxf.interceptor.Fault: No such operation: (HTTP GET PATH_INFO: /CxfDem
- 【webservice】org.apache.cxf.interceptor.Fault: Unexpected wrapper element {http://webservice.index.
- javax.ws.rs.ProcessingException: org.apache.cxf.interceptor.Fault: No message body writer has been f
- SpringBoot CXF "interceptor for [XXX] has thrown exception, could not send message"
- java cxf org.apache.cxf.interceptor.Fault: Unmarshalling Error: null
- Java
- 对于大数(?)的是否为7的倍数的判断
- MFC下调用控制台
- Deis被微软收入囊中
- LeetCode之Find Bottom Left Tree Value
- WebService报org.apache.cxf.interceptor.Fault: Could not send Message 错误
- Spring MVC 的常用注解
- PHP面向对象之构造方法与析构方法
- 重复旋律 后缀数组 板子 最长可重叠重复子串问题
- centos7安装androidstudio环境经验
- oracle 表被锁定解决方法
- 工程图
- arm的一些概念(ARM7、Cortex-M的区别)
- Rails 中的异步任务