Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > Web service classes > PendingCall.onFault | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myPendingCallObj.onFault = function(fault) { // Your code here. }
fault Decoded ActionScript object version of the SOAPFault object with properties. If the error information came from a server in the form of XML, the SOAPFault object is the decoded ActionScript version of that XML.
The type of error object returned to PendingCall.onFault is a SOAPFault object. It is not constructed directly by you, but is returned as the result of a failure. This object is an ActionScript mapping of the SOAPFault XML type.
|
SOAPFault property |
Description |
|---|---|
|
|
String; a short string describing the error. |
|
|
String; the human-readable description of the error. |
|
|
String; the application-specific information associated with the error, such as a stack trace or other information returned by the web service engine. |
|
|
XML; the XML object representing the XML version of the fault. |
|
|
String; the source of the fault (optional if an intermediary is not involved). |
Nothing.
Callback function; you provide this function, which Flash Player calls when a web service method has failed and returned an error. The fault parameter is an ActionScript SOAPFault object.
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.
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. }
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00003715.html