Flash Media Server |
|||
| Server-Side ActionScript Language Reference > Server-Side ActionScript Language Reference > WebService class > WebService.onFault | |||
Flash Media Server 2.
myWS.onFault(fault){}
fault An object version of an XML SOAP fault (see SOAPFault class).
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.
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