5.3 同步方式spa
同步方式即請求方調用服務後,component將處理結果發送給另外一個外部服務處理,並將處理結果反方向返回。code
圖 Synchronouscomponent
同步方式經過inbound和outbound endpoint的exchange-pattern=」request-response」實現,相應配置以下:同步
<flow name="echo"> <inbound-endpoint address="http://localhost:7007/services/Echo" exchange-pattern="request-response" /> <cxf:jaxws-service serviceClass="demo.mule.umo.Echo" /> <component> <singleton-object class="demo.mule.umo.StdIo" /> </component> <vm:outbound-endpoint path="vm" exchange-pattern="request-response" /> </flow> <flow name="vm"> <vm:inbound-endpoint path="vm" exchange-pattern="request-response" /> <component> <singleton-object class="demo.mule.umo.Vm" /> </component> <stdio:outbound-endpoint system="OUT" exchange-pattern="one-way" /> </flow>
同步方式適用於經過Mule調用遠程服務的場景。io
to be continued...class