User Guide
852 Chapter 6: Components Dictionary
This is a good place to put code that handles any faults, for example, by telling the user that the
server isn’t available or to contact technical support, if appropriate.
Example
The following example handles errors returned from the web service method.
// handles any error returned from the use of a web service method
myPendingCallObj = myWebService.methodName(params)
myPendingCallObj.onFault = function(fault)
{
// catches the SOAP fault
DebugOutputField.text = fault.faultstring;
// add code to handle any faults, for example, by telling the
// user that the server isn’t available or to contact technical
// support
}
PendingCall.onResult
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myPendingCallObj.onResult = function(result)
{
// your code here
}
Parameters
result
Decoded ActionScript object version of the XML result returned by a web service
method called with
myPendingCallObj = myWebService.methodName(params).
Returns
Nothing.
Description
Callback function; you provide this function, which Flash Player calls when a web service method
succeeds and returns a result. The result is a decoded ActionScript object version of the XML
returned by the operation. In this function, include code that takes appropriate action based on
the result. To return the raw XML instead of the decoded result, access the
PendingCall.response property.