Reputation: 81
I am currently learning about Mule ESB and I have a question bothering me. I created App with Frontend in React and Backend in Node.js and I would like my API to send data through ESB with it inserting some data from public SOAP API. Then data from REST API and SOAP API would be combined into one endpoint that my Frontend could use. Is that possible? Could someone recommend some place where I could read more about it? I went through documentation but couldn't find such case. I use for that PC version of Anypoint Studio
EDIT: There is actually one more public REST API from which I would like to combine data into my endpoint. So in total 3 API responses combined into one JSON response.
Upvotes: 2
Views: 579
Reputation: 25872
If I understand correctly you want to implement an API with Mule runtime (it is not called Mule ESB since some years ago), and that API should invoke some SOAP Web Services and REST APIs requests to other backends, then collect and transform the responses into a single JSON to answer to your client. That is completely possible to implement with Mule.
You need to create a application, in the application create a flow that is triggered with the HTTP Listener. Inside the flow use the Web Service Consumer to invoke SOAP Web Services. Use the HTTP Request connector to invoke REST APIs. Use the target variable configuration in each to save the responses to variables. Finally use the Transform component to transform the responses into a single JSON response before the end of the flow.
Upvotes: 3