WebService class
165
Example
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;
}
WebService.onLoad
Availability
Flash Media Server 2.
Usage
myWS.
onLoad(
wsdldocument)
Parameters
wsdldocument
A WSDL XML document.
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.
Содержание FLASH MEDIA SERVER 2
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...