I have some web service (CXF) on Mule Esb (3.4). At the current moment I try to find the simple way to set up web service response that I need for UAT. I read a lot of information in the internet and as I understood there is a special framework Munit for all types of testing. But, it seems, this framework is used for more complex things than I need. So, could anybody recommend me a simple way to force Mule Esb return predefined xml response. It will be fine if I create an xml response as xml document, upload it in any folder and Mule will send it as response when I call a web service. Thank you for any info for solving my task.
Asked
Active
Viewed 693 times
2 Answers
0
You could probably upload the example responses to the classpath and then, in your flows just load that file and set it as payload.
See this other stackoverflow question around how to accomplish this.

Community
- 1
- 1

Víctor Romero
- 5,107
- 2
- 22
- 32
0
You could use 2 flows.
1 flow for production with the Webservice implementation and 1 flow for UAT testing which returns you just a predefined XML (for example via the http endpoint).
Put both files in a seperate file and make a mule-deploy.properties file for both UAT and Production where you include the corect flows respectivly.

Cuball
- 89
- 5