0
我實際上通過端口8081上的http請求調用exe
和expression-component
。exe
在端口8082上發送http請求,並且能夠記錄輸出。 最後我不得不回覆流的輸出發送回主流,但我不知道如何...Mule異步請求 - 回覆
這裏是我的代碼:
<flow name="mainFlow" doc:name="mainFlow">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8081" doc:name="HTTP" />
<request-reply timeout="10000">
<vm:outbound-endpoint path="request" exchange-pattern="one-way"/>
<vm:inbound-endpoint path="reply" exchange-pattern="one-way"/>
</request-reply>
</flow>
<flow name="request" doc:name="request">
<vm:inbound-endpoint path="request" doc:name="VM" />
<expression-component doc:name="Expression">Runtime.getRuntime().exec("C:\\myfile.exe arg1");</expression-component>
</flow>
<flow name="reply" doc:name="reply">
<http:inbound-endpoint address="http://localhost:8082" doc:name="HTTP" exchange-pattern="one-way" />
<logger message="#[message.inboundProperties['test']]" level="INFO" doc:name="Logger"/>
<vm:outbound-endpoint path="reply" doc:name="VM" exchange-pattern="one-way"/>
</flow>
我想你還必須從請求出站中刪除MULE_REPLYTO屬性: message-properties-transformer> vm:出站端點> –
好點。是的,可能取決於表達式組件如何影響對機制的回覆。 –
謝謝!它的作品:) – Daniel