Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mule 迁移到新的HTTP连接器_Mule - Fatal编程技术网

Mule 迁移到新的HTTP连接器

Mule 迁移到新的HTTP连接器,mule,Mule,我已经从Mule 3.3.x升级到3.6.x,由于旧的http端点在3.6.x中被弃用,我想迁移到新的http连接器 下面是调用Web服务和healthcheck的原始代码 Webservice <http:outbound-endpoint connector-ref="NoSessionConnector" address="${testmigrationapp.endpoint.url}"

我已经从Mule 3.3.x升级到3.6.x,由于旧的http端点在3.6.x中被弃用,我想迁移到新的http连接器

下面是调用Web服务和healthcheck的原始代码

Webservice

<http:outbound-endpoint connector-ref="NoSessionConnector"
                            address="${testmigrationapp.endpoint.url}"
                            responseTimeout="${testmigrationapp.endpoint.timeout}" keep-alive="true"
                            responseTransformer-refs="errorHandler">
        <jms:transaction action="ALWAYS_JOIN"/>

健康检查

<http:inbound-endpoint exchange-pattern="request-response" address="${testmigrationapp.healthcheck.address}" doc:name="HTTP"/>

我将如何使用新的HTTP连接器实现这一点


谢谢

HTTP出站端点将转换为HTTP请求。您需要定义一个
请求配置
,指定主机、端口和持久连接(因为
keep alive=true
)。然后,您可以使用指定URL路径和响应超时的
请求
元素替换出站端点。例如:

<http:request-config name="persistentRequestConfig" usePersistentConnections="true" host="example.com" port="80" />

<flow name="persistent">
    <http:request config-ref="persistentRequestConfig" path="/" responseTimeout="30" />
</flow>
<http:listener-config name="listenerConfig" host="0.0.0.0" port="8081"/>

<flow name="testFlow">
    <http:listener config-ref="listenerConfig" path="/"/>
    <echo-component/>
</flow>

有关迁移的更多详细信息,您可以查看我们的网站。

您查看了Mule网站上的文档吗?是的,但没有多大帮助