为Mule中的Web服务使用者设置SO_TIMEOUT [英] Setting SO_TIMEOUT for Webservice consumer in mule

查看:341
本文介绍了为Mule中的Web服务使用者设置SO_TIMEOUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用网络服务使用者来访问由第三方托管的服务. 点击服务时,SocketTimeOutException会在16分钟后发生.

We are using webservice consumer to hit a service hosted by 3rd party. While hitting the service, SocketTimeOutException happens after 16 minutes.

我们的Web服务使用者配置如下所示.

Our webservice consumer config is as given below.

<ws:consumer-config name="config_name"
    wsdlLocation="${wsdlLocation}"
    service="Service_name" port="service_portType"
    serviceAddress="${serviceAddress}"
    doc:name="Web Service Consumer" />

    <ws:consumer config-ref="config_name" operation="test_operation"
        doc:name="do_it" />

我们在配置文件顶部设置了默认响应超时.

We have a default response timeout set at top of the configuration file.

      <configuration defaultResponseTimeout="1000000" doc:name="Configuration" />

现在,当我们向第三方询问超时时,他们要求我们将服务器的SO_TIMEOUT设置为0.

Now, when we asked the 3rd party about the time out, they asked us to set the SO_TIMEOUT of server to 0.

我知道我们可以使用属性'serverSoTimeout ="0"'为https:connector设置它. 我的问题是我们如何为Webservice使用者设置它?

I know we can set it for https:connector with property 'serverSoTimeout="0"'. My question is how do we set it for Webservice consumer?

推荐答案

可以通过向Web服务端点添加参数来设置此值,如下所示: http://主机名:port/restoftheendpoint?responseTimeout = 120000 或者 可以在连接到wsconsumer配置的http侦听器全局配置上进行设置,如下所示:

This can be set by adding a parameter to your webservice endpoint like this: http://hostname:port/restoftheendpoint?responseTimeout=120000 Or This can be set up on the http listener global configuration attached to your wsconsumer config as below:

<ws:consumer-config name="test"         wsdlLocation="test.wsdl" service="test" port="testSoap"         serviceAddress="${test.endpoint}" doc:name="Web Service Consumer"       connectorConfig="HTTP_Request_Config" />
    <http:request-config name="HTTP_Request_Config" host="test" port="2000" responseTimeout="30000" doc:name="HTTP Request Configuration">

    </http:request-config>

这篇关于为Mule中的Web服务使用者设置SO_TIMEOUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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