Example
The following example creates a new Log object, passes it to a new WebService object, and
handles the log messages:
import mx.services.*;
// Creates a new Log object.
myWebSrvcLog = new Log();
// Passes the Log object to the web service.
myWebService = new WebService(wsdlURI, myWebSrvcLog);
// Handles incoming log messages.
myWebSrvcLog.onLog = function(message : String) : Void
{
mytrace("myWebSrvcLog.message: " + message);
}
PendingCall class (Flash Professional
only)
ActionScript Class Name
mx.services.PendingCall
The PendingCall class is part of the mx.services package and is used with the WebService
class. For an overview of the classes in the mx.services package, see
"Web service classes (Flash
Professional only)" on page
1413.
You don't create a PendingCall object or use a constructor function; instead, when you call a
method on a WebService object, the WebService method returns a PendingCall object. You
use the
and
callback functions to handle the
PendingCall.onResult
PendingCall.onFault
asynchronous response from the web service method. If the web service method returns a
fault, Flash Player calls
and passes a SOAPFault object that represents
PendingCall.onFault
the XML SOAP fault returned by the server or web service. A SOAPFault object is not
constructed directly by you, but is returned as the result of a failure. This object is an
ActionScript mapping of the SOAPFault XML type.
If the web service invocation is successful, Flash Player calls
and
PendingCall.onResult
passes a result object. The result object is the XML response from the web service, decoded or
deserialized into ActionScript. For more information about the WebService object, see
"WebService class (Flash Professional only)" on page
1437.
PendingCall class (Flash Professional only)
1423
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers