【问题标题】:HTTP Request Connector muleHTTP 请求连接器骡子
【发布时间】:2016-10-26 19:32:28
【问题描述】:

因为我在本地进行测试,所以我在同一个项目中有一个 Web 服务提供者和消费者流。在我的消费者流中,我有一个 HTTP 请求连接器,它应该会命中提供者流,但问题是在调试时它显示超时以命中提供者流,如果我再次跳过它会命中提供者流。同样在执行提供者流程之后,控制不会返回到消费者流程。 这是 HTTP 连接器配置:

<http:request-config name="HTTP_Request_Configuration" host="localhost" port="8081" basePath="/api" connectionIdleTimeout="10000000" doc:name="HTTP Request Configuration"/>


<http:request config-ref="HTTP_Request_Configuration" path="/PatientAdmission" method="POST" doc:name="HTTP"/>

我错过了什么吗?

以下是提供者 HTTP 侦听器配置

<http:listener-config name="api-httpListenerConfig" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<http:listener config-ref="api-httpListenerConfig" path="/api/*" metadata:id="426556ee-3ad8-4231-8c4c-ce3922720e6a" doc:name="HTTP"/>

【问题讨论】:

  • 显示暴露服务的流程,以便配置消费者连接器

标签: mule mule-component


【解决方案1】:

您能否尝试使用以下监听器配置并检查它是否有帮助(并让 http 请求配置相同):

<http:listener-config name="api-httpListenerConfig" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration" basePath="api"/>
<http:listener config-ref="api-httpListenerConfig" path="*" doc:name="HTTP"/>

谢谢, 希吉尔.R.K

【讨论】:

  • POST 完成后控制也不会返回到消费者流程
【解决方案2】:

在provider HTTP Listener config和consumer HTTP Request config中设置响应码后,响应返回到consumer flow。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多