REQUEST_RESULT (for a service)

This REQUEST_RESULT element specifies the number of seconds the GAS waits for the DVM to respond to pending transactions.

Syntax

<REQUEST_RESULT>seconds</REQUEST_RESULT>
  1. seconds specifies the number of seconds to wait for a response from a transaction request. A default value of 60 seconds is set by the resource $(ws.timeout.requestresult).

Child elements

There are no child elements.

Usage

You use the REQUEST_RESULT timeout to provide information to the user when a web service transaction is taking longer than expected. It specifies the number of seconds to wait for the DVM to respond to the GAS, after which the GAS sends an HTTP 400 error page to the front-end to inform the user that the request has taken too long to fulfill.

The front-end cannot recover from a HTTP 400 error page, and the web service client application must send a new request.

Important:

When configuring this setting, you must ensure it is less than the Common Gateway Interface (CGI) timeout of the web server you are using.

Usage example with resource

<REQUEST_RESULT>$(ws.timeout.requestresult)</REQUEST_RESULT>
The default value of the resource $(ws.timeout.requestresult) is 60 seconds. You can set a REQUEST_RESULT with the resource:
<RESOURCE Id="ws.timeout.requestresult" Source="INTERNAL">90</RESOURCE>
In this example, the timeout duration is set to 90 seconds. This means that the GWS proxy will wait for 90 seconds before it frees up the DVM responsible for a service that hasn't responded within that time.
Using the resource has advantages over setting the timeout directly for the following reasons:
  • Shared resource: The resource is shared by other configuration components, ensuring that any changes automatically apply everywhere it is used.
  • Command line override: You can override the default value from the command line when starting the dispatcher by using the resource. For example: httpdispatch -E ws.timeout.requestresult=70.

Usage example - use REQUEST_RESULT directly

To set the REQUEST_RESULT directly in your web service configuration file (xcf), add a TIMEOUT element.
<APPLICATION Parent="ws.default">
   #...
   <TIMEOUT>
     <REQUEST_RESULT>90</REQUEST_RESULT>
   </TIMEOUT>
    #...
 </APPLICATION>

When configuring this setting, ensure you set the timeout less than the Common Gateway Interface timeout of the web server you are using.

In this example, the timeout duration is set to 90 seconds. This means that the GWS proxy will wait for 90 seconds before it frees up the DVM responsible for a service that hasn't responded within that time.

Parent elements

This element is a child of the following: