Forum Discussion

Sheeraz's avatar
Sheeraz
New Contributor
3 years ago
Solved

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. L...
  • SarahS's avatar
    SarahS
    3 years ago

    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: https://www.tutorialspoint.com/groovy/groovy_switch_statement.htm

    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. https://support.smartbear.com/readyapi/docs/functional/tutorial/samples.html