Start Virtual Service with specific Response in Service V Pro
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Start Virtual Service with specific Response in Service V Pro
In my case, I configured a REST POST request. There I have defined two different answer, as an example.
Response 1:
<Value> 1 </ value>
Response 2:
<Value> 2 </ value>
Is it possible to start the service with a specific response as desired? In one case it is Response 1 and in another case Response 2.
Best regardless of data from the request etc. No headers, no parameters etc.
It would not be that bad of Soapui, maybe even Groovy.
Thank you!
Best regards, Christoph
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Christoph,
Can you provide more details? Should service always reply with Response1? Or should it randomly use Response1 or Response2?
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Alex,
Thank you very much for your request.
In the best case permanently, as required Response 1, or Response 2 as well as Standard. But so that I can set the standard from the outside. Best per Groovy.
Many greetings, Christoph
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you provide an example?
Static request assumes same static response. I can hardly imagine web service that for the same static request returns one response today and another response tomorrow.
If you need to reply with different responses to the request of the same structure but with different parameters, then you should use different dispatch style depending on how parameters are provided in the request.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
