Web Services Functions (Soap, WEB_SERVICE, Silverlight) > Alphabetical List of Functions > web_service_wait_for_event

web_service_wait_for_event

Example: web_service_wait_for_event Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

Waits for response to previous asynchronous service request.

This function returns the name of the event captured. If "Quantifier=ALL" is specified and more than one event is captured, any one of the event names is returned. If the call times out, null is returned.

char * web_service_wait_for_event( const char * StepName, const char * Quantifier, const char * Timeout, BEGIN_EVENTS, const char * EventName_1,[... EventName_n,] END_EVENTS, LAST );
StepName The name of the step as it appears in the test tree. Any text can be used.
Quantifier Either ALL or ANY. Indicates whether to wait for all the specified events to return or to wait for the first to return.
Timeout In milliseconds.
BEGIN_EVENTS A marker that indicates the beginning of the list of events.
EventName The list of events to wait for.
END_EVENTS A marker that indicates the end of the list of events.
LAST A marker that indicates the end of the argument list.

After a call to web_service_wait_for_event, the test run is paused until receipt of one or all of the events specified.

The events must be created in a previous call to web_service_call.

Note that you have to increase the total number of concurrent connections per host and per vuser to use asynchronous requests. For example:

web_set_sockets_option("MAX_CONNECTIONS_PER_HOST","10");
web_set_sockets_option("MAX_TOTAL_CONNECTIONS","10");

Parameterization

All arguments can be parameterized using standard parameterization.