
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
112
// (and service.onFault is also invoked).
8 Handle either the output or the error fault returned from the invocation:
// Handle a successful result.
callback.onResult = function(result){
// Receive the SOAP output, which in this case
// is deserialized as a struct (ActionScript object).
for (var i in result){
trace(i +" : " +result[i]);
}
}
// Handle an error result.
callback.onFault = function(fault){
// Catch the SOAP fault and handle it
// according to this application’s requirements.
for (var i in fault){
trace(i +" : " +fault[i]);
}
}
Event handler summary
WebService constructor
new WebService(wsdlURI)
Creates a new WebService object. You must use the constructor to create a WebService object before you call any of
the WebService class methods.
Availability
Flash Media Server 2
Parameters
wsdlURI A string specifying the URI of a WSDL.
Returns
A WebService object.
Example
The following example prepares the WSDL location and passes it to the WebService constructor to create a new
WebS er vice obje ct,
stockService:
load("webservices/WebServices.asc");
var wsdlURI = "http://www.flash-db.com/services/ws/companyInfo.wsdl";
stockService = new WebService(wsdlURI);
WebService.onFault()
myWS.onFault(fault){}
Invoked when an error occurs during WSDL parsing. The web services features convert parsing and network
problems into SOAP faults for simple handling.
Event handler Description
WebService.onFault() Invoked when an error occurs during WSDL parsing.
WebService.onLoad() Invoked when the web service has successfully loaded and parsed its WSDL file.
Commenti su questo manuale