1

I have a flow that uses the http:rest-service-component component. The URL that I want to call takes around a minute to return a response, but "http:rest-service-component" only waits for 10 seconds.

How do I change this timeout value? The http:rest-service-component element doesn't have any sort of timeout attribute. I also tried creating an "http:connector" and setting a timeout value there, but that didn't work. Thanks.

<flow name="theFlow">
  <inbound-endpoint ... />
  <http:rest-service-component serviceUrl="..." />
</flow>
4

1 回答 1

5

如果您可以将此超时设置为全局值,那么您可以将其设置为 30 秒:

<configuration defaultResponseTimeout="30000" />

不过,这将影响所有传输的所有出站端点。如果您只想影响此 HTTP 交互,我看到的唯一选项是在属性responseTimeout末尾添加一个查询字符串参数:serviceUrl

responseTimeout=30000

应该有效,但我尚未确认。

于 2012-06-07T16:28:17.347 回答