|
Flash Media Server Resources |
SOAPFault classThe SOAPFault class is the object type of the error object returned to the WebService.onFault() and SOAPCall.onFault() functions. This object is returned as the result of a failure and is an ActionScript mapping of the SOAP Fault XML type. Property summary
SOAPFault.faultstringmySOAPFault.faultstring A string indicating the human-readable description of the error. ExampleThe following example shows the fault code in a text field if the WSDL fails to load: // Load the WebServices class:
load("webservices/WebServices.asc");
// Prepare the WSDL location:
var wsdlURI = "http://www.flash-db.com/services/ws/companyInfo.wsdl";
// Instantiate the web service object by 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;
}
|