gpt4 book ai didi

apache-camel - Camel CXF : Soap client timeout

转载 作者:行者123 更新时间:2023-12-04 04:54:58 25 4
gpt4 key购买 nike

我正在使用 Camel CXF 端点连接到我的 SOAP 服务器。我想为客户的请求添加超时。我正在使用 continuationTimeout 选项。但这不起作用。请求超时,未等待我配置的时间。

下面是我的端点配置。

<camel-cxf:cxfEndpoint id="tmAPIWSEndpoint" address="http://IN2NPDCEDB01:8088/webservices/services/TransportationManager"
wsdlURL="/wsdl/TransportationManager.wsdl"
endpointName="cis:TransportationManagerPort"
serviceName="cis:TransportationManagerService"
xmlns:cis="http://www.i2.com/cis"
continuationTimeout="60000">
<camel-cxf:properties>
<entry key="dataFormat" value="MESSAGE"/>
<entry key="username" value="XXX"/>
<entry key="password" value="XXX"/>
</camel-cxf:properties>
</camel-cxf:cxfEndpoint>

最佳答案

你的问题不是很清楚,因为没有camel路由,所以我看不到你是在Camel内部创建SOAP服务还是从Camel作为客户端调用SOAP服务。根据您发送的一点信息,您似乎正在创建一个客户端。

根据camel CXF文档

  • continuationTimeout:此选项用于设置 CXF 继续超时,默认情况下可在 CxfConsumer 中使用当 CXF 服务器使用 Jetty 或 Servlet 传输时。 (前Camel 2.14.0,CxfConsumer 只是将延续超时设置为0,表示继续挂起操作永不超时。)

请注意,这与 CXF 服务器设置相关,而不是客户端设置。您正在使用此属性,但我认为这不是您正在寻找的。

如果您引用Apache CXF Client Settings Documentation页面上您会发现以下注释:

  • ConnectionTimeout:指定客户端在连接之前尝试建立连接的时间(以毫秒为单位)超时。默认值为 30000(30 秒)。 0 指定客户端将继续无限期地尝试打开连接。
  • ReceiveTimeout:指定客户端在超时之前等待响应的时间(以毫秒为单位)。这默认值为 60000。0 指定客户端将无限期等待。

如果您访问 CXF 文档页面,那里有很多示例。

关于apache-camel - Camel CXF : Soap client timeout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46197967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com