Setting Timeout Intervals
You can configure timeout intervals for a web service response using the setTimeout method on the Service instance. For more details, see the description of this method in the General Interface API Reference in General Interface Builder (Help > API Documentation).
Handling Errors
When an operation generates an error, the error information is returned to the Request object for the response. You can write a JavaScript function that gets the error information, adds business logic for handling the error scenario, and displays the error to the user.
When errors occur, they can take several forms:
- HTTP errors can be determined by calling getRequest on the Service instance and then querying the jsx3.net.Request object for its status (getStatus) and status description (getStatusText).
- SOAP faults can be processed by mapping to the fault rules that are created by the XML Mapping Utility when the WSDL is parsed (assuming the WSDL defines them).
- Formatting errors, such as a string in a number field or an enumerated value not being entered, can be determined by subscribing to the ON_INVALID subject for the service instance. When an error is encountered during message generation, the specified callback function is notified.
- JavaScript errors display in the System Log palette for General Interface Builder.