wsb.wait-for-request

function

Library: Web Services Broker (OMWSB)
Import : omwsb.xmd

Returns: the next request for the program to process


Declaration
export external request function wait-for-request 
  on                        value server server optional

Argument definitions

server
A wsb.server OMX variable that was returned from a call to wsb.create-server in the server program, or not specified in a service program


Purpose

The wsb.wait-for-request function provides both the service and server programs a method for getting the next available request object which the program is to handle. The function blocks while waiting for its next request to become available. On arrival of the next request, it is returned so that it can be processed by the waiting program.

In a service program, there is no available server and thus the optional parameter must not be specified.

In the server program, the parameter must be the server on which to wait for a request.

If the previously returned request (if any) has not had a response written to it, wsb.wait-for-request will write an HTTP error to the client and close the connection.

Related Topics