cxf资料

压缩 http://opensourceforce.org/forum/viewthread.php?tid=2759
超时和附件上传http://cxf.547215.n5.nabble.com/CXF-client-td597616.html

Handling the Apache CXF Java Client Timeout
If you are using CXF, you can control the client timeout by programmatically obtaining the HTTPConduit from the proxy and setting the ConnectionTimeout and ReceiveTimeout properties.

For example:

import org.apache.cxf.frontend.ClientProxy;

import org.apache.cxf.transport.http.HTTPConduit;

import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;

import com.primavera.ws.p6.job.JobPortType;

//...


JobPortType port = testCase.getJobServicePort();

org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);

HTTPConduit httpConduit = (HTTPConduit)client.getConduit();

HTTPClientPolicy policy = httpConduit.getClient();

// set time to wait for response in milliseconds. zero means unlimited

policy.setReceiveTimeout(0);

Or, you can control the client timeout by modifying the spring configuration for the client http-conduit file.

Please refer to the CXF User's Guide for information about using the http-conduit file to control the client timeout. At the time of this writing, the CXF User's Guide was available at http://cwiki.apache.org/CXF20DOC.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值