简体   繁体   中英

Mule ESB Consume Multiple REST Services

My API name is A, and I have to call 2 REST services in my API.

I was able to call one REST service, and tried calling 2nd REST service using Scatter-Gather but no luck.

Here is my flow diagram for calling single REST service 在此输入图像描述

Based on service response, I am using Choice and transforming message to my Service schema and things are cool up to this point, but I have few fields left in my schema, those need to fetched from other REST call. So.., How can i consume two REST services and transform them into my API schema?

在此输入图像描述

I have tried with scatter-gather, first call POST and second call is GET and I was able to map some details from first and some details from second REST call to my API schema, but How can I display my final output ?

Thanks

You can do this by using Variable transformers to store the results of the calls. I was able to achieve something similar using the following: 图片

Note the use of sub-flows, each of which start with an HTTP Request Connector.

I'd be happy to clarify anything here if needed, just let me know!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM