cancel
Showing results for 
Search instead for 
Did you mean: 

Start Virtual Service with specific Response in Service V Pro

New Contributor

Start Virtual Service with specific Response in Service V Pro

I have a question regarding the REST Virtual Service with Serice 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
3 REPLIES 3
Community Hero

Re: Start Virtual Service with specific Response in Service V Pro

Hi Christoph,

 

Can you provide more details? Should service always reply with Response1? Or should it randomly use Response1 or Response2?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: Start Virtual Service with specific Response in Service V Pro

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

Highlighted
Community Hero

Re: Start Virtual Service with specific Response in Service V Pro

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.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================