You can define several responses for an operation in your virtual service. The Dispatch Style setting of an operation specifies which response the virtual service returns in this or that case:
The following dispatch types are available:
|Sequence||Returns responses in series.|
|Random||Returns a response selected randomly.|
|Query Match||Selects a response based on the data of the incoming request.|
|XPath||Selects a response by retrieving data from the incoming request with an XPath expression.|
|Script||Selects a response by running a script code.|
|Parameter||Selects a response by analyzing parameters of the incoming request.
Available for REST virtual services only.
Virtual services can support a limited set of dispatch types:
Sequence Random Script Query Match XPath Parameter JDBC TCP
The dispatch strategies are mutually exclusive and cannot be combined. If you need an advanced response selector, use the Script dispatch type.