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