Camel - How to set CXF Client Timeout

血红的双手。 提交于 2019-12-24 13:46:01

问题


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")

Timeout for this connection is 30 seconds by default. Question is how can I decrease the timeout value on the client side?

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>

But I don't have any control on the Web Service itself, I just need to set the timeout on the client side.


回答1:


You can do the same http-conf:conduit on the client side.



来源:https://stackoverflow.com/questions/20473477/camel-how-to-set-cxf-client-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!