2013-12-09 56 views
1

我有一個包上保險絲ESB 7.利用CXF喜歡這個消息路由到Web服務:駱駝 - 如何設置CXF客戶端超時

from("vm:myEndPoint") 
.to("cxf:http://remotews:8989/CreateUser/UserBean?serviceClass=com.co.Srvcl") 

超時此連接是默認爲30秒。問題是如何減少客戶端的超時值?

從我的理解,這個超時可以在CXF Web服務進行設置(WS製片方)如下:

<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服務本身的任何控制,我只需要在客戶端設置超時。

回答

2

您可以在客戶端執行相同的http-conf:conduit

+1

http-conf:管道使用name =「*。http-conduit」 謝謝。 – user3082845