Apache camel 为Apache Camel CXF使用者组件设置超时

Apache camel 为Apache Camel CXF使用者组件设置超时,apache-camel,cxf,Apache Camel,Cxf,我想为Apache Camel CXF消费组件设置超时 我的代码看起来像: <route> <from uri="direct:NDS/getUserInformation" /> <to uri="freemarker:file:/application/DT/adapter/NDSLookupService.ftl" /> <bean ref="ndsServiceLogger" method="logNDSRequest" /&g

我想为Apache Camel CXF消费组件设置超时

我的代码看起来像:

<route>
   <from uri="direct:NDS/getUserInformation" />
   <to uri="freemarker:file:/application/DT/adapter/NDSLookupService.ftl" />
   <bean ref="ndsServiceLogger" method="logNDSRequest" />
   <setHeader headerName="SOAPAction">
      <simple>getLookUpServiceDetails</simple>
   </setHeader>
   <bean ref="ndsServiceLogger" method="logNDSServiceStartTime" />
   <toD uri="${headers.nds_url}?wsdlURL=/application/DT/adapter/NDSLookupService.wsdl&amp;serviceName={http://webservices.lookup.sdp.bharti.ibm.com}NDSLookupServiceService&amp;portName={http://webservices.lookup.sdp.bharti.ibm.com}NDSLookupService&amp;dataFormat=MESSAGE" />
   <bean ref="ndsServiceLogger" method="logNDSServiceEndTime" />
   <bean ref="ndsServiceLogger" method="logNDSResponse" />
   <convertBodyTo type="java.lang.String" />
</route>

getLookUpServiceDetails
如何尝试属性
http.connection.timeout
http.receive.timeout

UPD:它不工作。。。我可以告诉你去哪里

我将CXF总线用于端点和异步传输(doc at。 可以在那里设置超时,如下所示

<cxf-core:bus bus="bus-common-outbound">
    <cxf-core:properties>
        <spring:entry key="use.async.http.conduit" value="true" />
        <spring:entry key="org.apache.cxf.transport.http.async.usePolicy" value="ALWAYS" />
        <spring:entry key="org.apache.cxf.transport.http.async.SO_TIMEOUT" value="45000" /> 
    </cxf-core:properties>      
</cxf-core:bus>

端点的属性“bus”通过其“bus”属性指向该属性,如:
bus=bus common outbound


也许您可以使用类似的方法,或者深入挖掘默认同步传输…

检查此线程:这会产生错误:有2个参数无法在终结点上设置。检查uri,看这些参数是否拼写正确,它们是否是终结点的属性。未知参数=[{http.connection.timeout=5000,http.receive.timeout=5000}]明白了…我更新了答案。也许有更简单的方法…但我必须使用异步传输,而且使用。。。