WebService.onFault

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage
MyWebServiceObject.onFault = function(fault)
{
    // Your code here.
}

Parameters

fault Decoded ActionScript object version of the error with properties. If the error information came from a server in the form of XML, then the SOAPFault object is the decoded ActionScript version of that XML.

The type of error object returned to WebService.onFault methods is a SOAPFault object. This object is not constructed directly by you, but returned as the result of a failure. This object is an ActionScript mapping of the SOAPFault XML type.

SOAPFault property

Description

faultcode

String; the short standard QName describing the error.

faultstring

String; the human-readable description of the error.

detail

String; the application-specific information associated with the error, such as a stack trace or other information returned by the web service engine.

element

XML; the XML object representing the XML version of the fault.

faultactor

String; the source of the fault. Optional if an intermediary is not involved.

Returns

Nothing.

Description

Callback function; called by Flash Player when the new WebService() constructor has failed and returned an error. This can happen when the WSDL file cannot be parsed or the file cannot be found. The fault parameter is an ActionScript SOAPFault object.

Example

The following example handles any error returned from the creation of the WebService object.

MyWebServiceObject.onFault = function(fault)
{
    // Captures the fault.
    DebugOutputField.text = fault.faultstring;

    // Adds 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/00003735.html