Reputation: 163
In my application, a client sends a SOAP request through a JSP page to the Mule ESB and ESB routes it to a Weather Service. I want to send the response from the service to the client through ESB: how can I structure the flow to achieve this? Where will the response land in Mule ESB in first place?
<Flow>
Step1:inbound endpoint>
Step 2:<component>
Step 3:<outbound endpoint>
Step4:<component>
Step 5:<outbound endpoint>
<Flow>
Is this flow correct? Is this enough to pass the reponse to the client?
I have some questions on this:
Code snippets or samples regarding this will be a great help.
Please give your suggestions.
Upvotes: 0
Views: 1162
Reputation: 1
https://developer.mulesoft.com/docs/display/current/Using+Perceptive+Flow+Design
https://developer.mulesoft.com/docs/display/current/Flows+and+Subflows Mule applications are built around one or more flows. Typically, a Mule application begins processing a message it is received by an inbound endpoint in a flow. This flow can then either implement all processing stages, or route the message to other flows or subflows to perform specific tasks. Relative to the flow which triggered its execution, a flows and subflows can process messages either synchronously (see below, top) or asynchronously
Upvotes: 0
Reputation: 4795
For transforming the response u got from the service to whatever response as expected by the user. you should use outbound transformers to do so
probably you can take a look at transformers in mule. http://www.mulesoft.org/documentation/display/MULE2USER/Using+Transformers
Upvotes: 0
Reputation: 33413
Assuming all your endpoints are request-response, the message that will reach the end of your flow will be used as a response to the inbound endpoint.
In the response phase, Mule doesn't go through the flow elements it went through in the request phase. You could actually add components/transformers to execute only in the response phase by wrapping them in a <response> element.
So the answers are:
Upvotes: 0