骆驼-如何设置CXF客户端超时 [英] Camel - How to set CXF Client Timeout
本文介绍了骆驼-如何设置CXF客户端超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Fuse ESB 7上有一个捆绑包。它使用CXF将消息路由到Web服务,如下所示:
I have a bundle on Fuse ESB 7. It routes a message to a web service using CXF like this:
from("vm:myEndPoint")
.to("cxf:http://remotews:8989/CreateUser/UserBean?serviceClass=com.co.Srvcl")
此连接的超时默认为30秒。问题是如何减少客户端的超时值?
据我了解,可以在CXF Web服务上设置此超时( WS生产方)如下:
From what I have understood, this timeout can be set on the CXF web service (WS producer side) as below:
<http-conf:conduit
name="{http://service.co.com}MyServiceBean.http-conduit">
<http-conf:client ReceiveTimeout="4000" ConnectionTimeout="4000" />
</http-conf:conduit>
<cxf:cxfEndpoint id="myEndpoint" address="${my.url}"
endpointName="s:srvcl-wsPort" serviceClass="com.co.Srvcl"
serviceName="s:SrvclService" xmlns:s="http://my.comp.com">
<cxf:properties>
<entry key="dataFormat" value="POJO" />
<entry key="serviceClass" value="com.co.Srvcl" />
</cxf:properties>
</cxf:cxfEndpoint>
但是我对Web服务本身没有任何控制权,我只需要设置超时时间
But I don't have any control on the Web Service itself, I just need to set the timeout on the client side.
推荐答案
您可以执行相同的 http-conf:conduit
在客户端。
You can do the same http-conf:conduit
on the client side.
这篇关于骆驼-如何设置CXF客户端超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文