Example
The following example displays the fault code in a text field if the WSDL fails to load and the
event fires:
onFault
// 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;
}
WebService.onLoad
Availability
Flash Media Server 2.
Usage
myWS.onLoad(wsdldocument)
Parameters
A WSDL XML document.
wsdldocument
Returns
Nothing.
Description
Event handler; called 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 not actually transmitted until the WSDL has loaded.
WebService class
165
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?