
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
113
Availability
Flash Media Server 2
Parameters
fault An object version of an XML SOAP fault (see SOAPFault class).
Example
The following example displays the fault code in a text field if the WSDL fails to load and the
onFault() event fires:
// 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;
}
WebService.onLoad()
myWS.onLoad(wsdldocument)
Invoked when the web service has successfully loaded and parsed its WSDL file. Operations can be invoked in an
application before this event occurs; when this happens, they are queued internally and are not actually transmitted
until the WSDL has loaded.
Availability
Flash Media Server 2
Parameters
wsdldocument A WSDL XML document.
Example
In the following example, the
onLoad event is used to handle the WSDL parsing:
// 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;
Commenti su questo manuale