WebService class (Flash Professional only)
ActionScript Class Name
The WebService class is part of the mx.services package and is used with the Log, PendingCall,
and SOAPCall classes. For an overview of the classes in the mx.services package, see
classes (Flash Professional only)" on page
Note: The WebService class is not the same as the WebServiceConnector class. The
WebServiceConnector class provides an ActionScript interface to the visual WebServiceConnector
component.
The WebService object acts as a local reference to a remote web service. When you create a new
WebService object, the WSDL file that defines the web service gets downloaded, parsed, and
placed in the object. You can then call the methods of the web service directly on the WebService
object and handle any callbacks from the web service. When the WSDL has been successfully
processed and the WebService object is ready, the
there is a problem loading the WSDL, the
When you call a method on a WebService object, the return value is a callback object. The object
type of the callback returned from all web service methods is
normally not constructed by you, but instead are constructed automatically as a result of the
webServiceObject.webServiceMethodName()
the result of the WebService call, which occurs later. Instead, the PendingCall object represents
the call in progress. When the WebService operation finishes executing (usually several seconds
after a method is called), the various PendingCall data fields are filled in, and the
PendingCall.onResult
information about the PendingCall object, see
on page
845.
Flash Player queues any calls you make before the WSDL is parsed, and attempts to execute them
after parsing the WSDL. This is because the WSDL contains information that is necessary for
correctly encoding and sending a SOAP request. Function calls that you make after the WSDL
has been parsed do not need to be queued; they are executed immediately. If a queued call doesn't
match the name of any of the operations defined in the WSDL, Flash Player returns a fault to the
callback object you were given when you originally made the call.
The WebServices API, included under the mx.services package, consists of the WebService class,
the Log class, the PendingCall class, and the PendingCall class.
To make the web service classes available at runtime, you must have the WebServiceConnector
component in your FLA file's library. If you're using ActionScript only to access a web service at
runtime, you must add this component manually to your document's library. For information on
how to add this component to your document, see Chapter 14, "Data Integration (Flash
Professional Only)," in Using Flash.
856
Chapter 6: Components Dictionary
mx.services.WebService
842.
WebService.onFault
or
PendingCall.onFault
"PendingCall class (Flash Professional only)"
WebService.onLoad
callback is invoked.
PendingCall
method that was called. These objects are not
callback you provide is called. For more
"Web service
callback is invoked. If
. These objects are
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers