WebService.onFault

Availability

Flash Media Server 2.

Usage

myWS.onFault(fault){}

Parameters

fault  An object version of an XML SOAP fault (see SOAPFault class).

Returns

Description

Event handler; called when an error occurs during WSDL parsing. The web services features convert parsing and network problems into SOAP faults for simple handling.

Example

The following example displays the fault code in a text field if the WSDL fails to load and the onFault event fires:

// Prepare the WSDL location:
var wsdlURI = "http://www.flash-db.com/services/ws/companyInfo.wsdl";

// Instantiate the web service object using the WSDL location: 
stockService = new WebService(wsdlURI);

// Handle the WSDL parsing and web service instantiation event.
stockService.onLoad = function(wsdl){
    wsdlField.text = wsdl;
}

// If the wsdl fails to load the onFault event is fired:
stockService.onFault = function(fault){
    wsdlField.text = fault.faultstring;
}

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000797.html