简体   繁体   中英

Mock ups in Mule Esb web services

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.

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.

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.

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