Forum Discussion

Sheeraz's avatar
New Contributor
3 years ago

How to virtualize API using xml request and response

Hi Team,

I am new to readyAPI, looking for API virtualization using xmls.

I have a set of request and response, in a single API I want to get response by looking at the particular argument value. Likewise, if a selected argument value matches it should return the specific response accordingly.

For example in my request will be having an argument called <policy number>12345</policy number>

I have multiple policy number with specific responses each.


Could you please help how can we achieve this requirement using ReadyAPI, it would be really helpful if i get some steps.




  • The Parameter dispatch setting is available for REST virtual services only. So, unfortunately we can't use this approach here. 

    What we could do is use a script to implement our logic to dispatch the results in a groovy script. Something like a switch statement could help you out here. This is a good resource if you're not familiar with scripting:

    I would also advise downloading the SOAP sample project as it contains a SOAP virtual API that uses a script to dispatch responses. You can download this under the sample projects under your dashboard tab. If you're having trouble finding this project you can click here for more instructions on where to find it.

3 Replies