骆驼CXF:肥皂客户端超时 [英] Camel CXF: Soap client timeout

查看:98
本文介绍了骆驼CXF:肥皂客户端超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Camel CXF端点连接到我的soap服务器.我想为客户端的请求增加超时时间.我为此使用了 continuationTimeout 选项.但这不起作用.请求超时,没有等待我配置的时间.

I am using Camel CXF endpoint to connect to my soap server. I wanted to add timeout for my request from client. I am using continuationTimeout option for that. But it's not working. The request is timeout without waiting for the time that I've configured.

以下是我的端点配置.

<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中创建SOAP服务还是在从中调用SOAP服务骆驼为客户.根据您发送的一点信息,看来您正在创建一个客户端.

Your question is not very clear since there is no camel route so I cant see if you are creating a SOAP service inside Camel or you are calling a SOAP service from Camel as the client. Based on the little bit information you sent it seems you are creating a client.

根据骆驼CXF文档

  • continuationTimeout::此选项用于设置CXF连续超时,默认情况下,该超时可在CxfConsumer中使用. 当CXF服务器使用Jetty或Servlet传输时. (前 Camel 2.14.0,CxfConsumer只是将继续超时设置为 0,表示继续挂起操作永不超时.)
  • continuationTimeout: This option is used to set the CXF continuation timeout which could be used in CxfConsumer by default when the CXF server is using Jetty or Servlet transport. (Before Camel 2.14.0, CxfConsumer just set the continuation timeout to be 0, which means the continuation suspend operation never timeout.)

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

Notice that this is related to CXF server settings not client settings. You are using this property but I dont think this is what you are looking for.

如果您引用 Apache CXF客户端设置文档页上,您将在其中找到以下注意事项:

If you reference the Apache CXF Client Settings Documentation page you will find the following notes there:

  • ConnectionTimeout::指定客户端尝试在其之前建立连接的时间(以毫秒为单位) 超时.默认值为30000(30秒). 0指定 客户将继续尝试无限期地打开连接.
  • ReceiveTimeout:指定客户端在超时之前等待响应的时间(以毫秒为单位).这 默认值为60000.0指定客户端将无限期等待.
  • ConnectionTimeout: Specifies the amount of time, in milliseconds, that the client will attempt to establish a connection before it times out. The default is 30000 (30 seconds). 0 specifies that the client will continue to attempt to open a connection indefinitely.
  • ReceiveTimeout: Specifies the amount of time, in milliseconds, that the client will wait for a response before it times out. The default is 60000. 0 specifies that the client will wait indefinitely.

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

If you visit the CXF documentation page there is a lot examples there.

这篇关于骆驼CXF:肥皂客户端超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆