代码如下
service = (T) new XFireProxyFactory().create(serviceModel, url);
int TIMEOUT = 10000;
HttpClientParams params = new HttpClientParams();
params
.setParameter(HttpClientParams.USE_EXPECT_CONTINUE,
Boolean.FALSE);
params.setParameter(HttpClientParams.CONNECTION_MANAGER_TIMEOUT,
Long.parseLong(TIMEOUT+""));
params.setParameter(HttpClientParams.SO_TIMEOUT, TIMEOUT);
Client client = Client.getInstance(service);
client.setTimeout(TIMEOUT);
client.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS, params);
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, TIMEOUT+"");
client.setProperty(CommonsHttpMessageSender.DISABLE_EXPECT_CONTINUE,
"true");
client.setProperty(CommonsHttpMessageSender.DISABLE_KEEP_ALIVE, "true");
但是 超时不起作用
页面上仍然长时间的载入中 且控制台日志如下:
2011-01-24 15:55:11,361 INFO [HttpMethodDirector.java:434] : I/O exception caught when processing request: Connection timed out
2011-01-24 15:55:11,362 INFO [HttpMethodDirector.java:440] : Retrying request
2011-01-24 15:58:20,350 INFO [HttpMethodDirector.java:434] : I/O exception caught when processing request: Connection timed out
2011-01-24 15:58:20,351 INFO [HttpMethodDirector.java:440] : Retrying request
2011-01-24 16:01:29,338 INFO [HttpMethodDirector.java:434] : I/O exception caught when processing request: Connection timed out
2011-01-24 16:01:29,339 INFO [HttpMethodDirector.java:440] : Retrying request
2011-01-24 16:04:38,327 ERROR [HttpChannel.java:144] : java.net.ConnectException: Connection timed out
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message.
org.codehaus.xfire.fault.XFireFault: Couldn't send message.
似乎隔三分钟 就去连接一下 第四次终于放弃了
分享到:
相关推荐
xfire客户端eclipse插件....非常有用
xfire客户端应该具有的JAR,最全最适宜。xfire客户端应该具有的JAR,最全最适宜。xfire客户端应该具有的JAR,最全最适宜。
xfire客户端生成自动生成java代码调用
commons-httpclient-3.1.jar,xfire客户端使用需包2
Xfire客户端调用webservice接口所需 jar包,亲测可用。
xfire客户端EXE的程序应用,可直接用客户端来连接远程Webservice服务端应用
cxf_axis_xfire客户端调用的几种方法[收集].pdf
xfire webserivce客户端 jar
十分的好用
XFire客户端流程分析
xfire客户端jar包以及一个Demo样板 Demo样板不能直接使用,因为和每个人调用的wsdl直接相关。 请修改后使用!
XFire Webservice 客户端
xfire客户端服务端测试样例,相关例子
xfire客户端端开发的JAR包,开发客户端用
webservice ixfir 客户端端开发 对象传递使webservice开发更加简单快捷
NULL 博文链接:https://chun521521.iteye.com/blog/846999
xfire根据WSDL生成客户端代码.rar
http://blog.csdn.net/robert8803/article/details/8135925这里面所需要的jar
NULL 博文链接:https://openstudy.iteye.com/blog/1114916
cxf_axis_xfire客户端调用的几种方法.docx