The 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.

Availability

Flash Media Server 2

Property summary

Property

Description

SOAPFault.detail

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

SOAPFault.faultactor

A string indicating the source of the fault.

SOAPFault.faultcode

A string indicating the short, standard qualified name describing the error.

SOAPFault.faultstring

A string indicating the human-readable description of the error.

SOAPFault.detail

 mySOAPFault.detail

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

Availability

Flash Media Server 2

SOAPFault.faultactor

 mySOAPFault.faultactor

A string indicating the source of the fault. This property is optional if an intermediary is not involved.

Availability

Flash Media Server 2

SOAPFault.faultcode

 mySOAPFault.faultcode

A string indicating the short, standard qualified name describing the error.

Availability

Flash Media Server 2

SOAPFault.faultstring

 mySOAPFault.faultstring

A string indicating the human-readable description of the error.

Availability

Flash Media Server 2

Example

The 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; 
 }

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy