setTimeout() |
It sets the maximum time that the Web server must wait for a response from the application service. If the response is not received within the specified time then a SOAP fault is thrown.
Syntax
Script |
modelID.instance.setTimeout(iTimeout) |
Parameters
Parameter |
Description |
---|---|
iTimeout |
This parameter is required. Integer that denotes the maximum waiting time in milliseconds. The default value is 30000 milliseconds. |
Sample Code
The following code sets the timeout on the instance of EmployeesModel to 1000 milliseconds (1 sec) before the server throws a SOAP fault.
EmployeesModel.instance. setTimeout(1000);
If there is no response from the application service within a second, a SOAP fault message is displayed stating that the server has timed out while getting the response from the application service.