CXF调用webservice超时设置
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(Service1Soap.class);// 设置请求接口
factory.setAddress("http://*.*.*.*/SMSService/Service1.asmx?WSDL");
Service1Soap esbServer = (Service1Soap) factory.create(); // 创建客户端对象
// 设置客户端的配置信息,超时等.
Client proxy = ClientProxy.getClient(esbServer);
HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(10000); // 连接超时时间
policy.setReceiveTimeout(10000);// 请求超时时间.
conduit.setClient(policy);
String _sendSms_account = "";
String _sendSms_password = "";
String _sendSms__return = "";
_sendSms_account = "1";
_sendSms_password = "2";
esbServer.sendSms(_sendSms_account, _sendSms_password, "", "", "");
System.out.println(System.currentTimeMillis() - a);
CXF调用webservice超时设置的更多相关文章
- cxf调用WebService
一.用CXF调用WebService的几种方式,参考: http://cxf.apache.org/docs/how-do-i-develop-a-client.html 二.JaxWsProxyFa ...
- Spring Boot 使用 CXF 调用 WebService 服务
上一张我们讲到 Spring Boot 开发 WebService 服务,本章研究基于 CXF 调用 WebService.另外本来想写一篇 xfire 作为 client 端来调用 webservi ...
- Java调用WebService方法总结(7)--CXF调用WebService
CXF = Celtix + XFire,继承了Celtix和XFire两大开源项目的精华,是一个开源的,全功能的,容易使用的WebService框架.文中所使用到的软件版本:Java 1.8.0_1 ...
- XML:使用cxf调用WebService接口时报错:编码GBK的不可映射字符(设置UTF-8字符集)
调用代码如下 JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf. ...
- cxf 调用 webservice服务时传递 服务器验证需要的用户名密码
cxf通过wsdl2java生成客户端调用webservice时,如果服务器端需要通过用户名和密码验证,则客户端必须传递验证所必须的用户名和密码,刚开始想通过url传递用户名和密码,于是在wsdl文件 ...
- 调用webservice超时问题的解决[转]
1.web.config配置,<system.web></system.web>里面增加:<httpRuntime maxRequestLength="1024 ...
- python调用函数超时设置
1.Windows中sign报错,Linux能很好的使用: https://pypi.python.org/pypi/timeout-decorator 2.Windows可以使用,Linux报错不能 ...
- 使用cxf调用webservice
1.引入maven包 <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt ...
- 使用Fiddler 4 调用WebService
Fiddler让我们这些.neter感到非常欣慰, 是用C#写出来的,它包含一个简单却功能强大的基于JScript .NET 事件脚本子系统,它的灵活性非常棒,可以支持众多的http调试任务,并且能够 ...
随机推荐
- windows7 启用管理员账户
在虚拟机中安装了windows7,方便使用qq,使用百度云,office等常用的软件.虚拟机使用的oracle的VirtualBox,个人使用体验不错,最棒的功能是能将物理机中的磁盘映射到虚拟机中网络 ...
- ****CI框架源码阅读笔记7 配置管理组件 Config.php
http://blog.csdn.net/ohmygirl/article/details/41041597 一个灵活可控的应用程序中,必然会存在大量的可控参数(我们称为配置),例如在CI的主配置文件 ...
- 【Python】 属性的 get 与 set 方法
在C#里面,属性的get 与 set 非常简单方便. public class bird { public int age { get;set; } public bool isadult { get ...
- [LeetCode] Remove Linked List Elements
Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --& ...
- 注解:【无连接表的】Hibernate双向1->N关联
Person与Address关联:双向1->N,[无连接表的],推荐使用 #由N端控制关联关系 #对于指定了mappedBy属性的@OneToMany,@ManyToMany,@OneToOne ...
- Android开发常用工具类
来源于http://www.open-open.com/lib/view/open1416535785398.html 主要介绍总结的Android开发中常用的工具类,大部分同样适用于Java. 目前 ...
- 在此为LCT开一个永久的坑
其实我连splay都还不怎么会. 今天先抄了黄学长的bzoj2049,以后一定要把它理解了. 写LCT怎么能不%数据结构大神yeweining呢?%%%chrysanthemums %%%切掉大森林 ...
- jquery:closest和parents的主要区别
closest和parents的主要区别是:1,前者从当前元素开始匹配寻找,后者从父元素开始匹配寻找:2,前者逐级向上查找,直到发现匹配的元素后就停止了,后者一直向上查找直到根元素,然后把这些元素放进 ...
- vim 编辑
- spring异常-aoperror at :0 formal unbound in pointcut
八月 17, 2016 10:15:21 上午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRe ...