MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1446

Components language reference
Table of Contents

Advertisement

Parameters
The URI of the web service WSDL file.
wsdlURI
An optional parameter specifying the name of the Log object for this web
logObject
service. If this parameter is used, the Log object must be created first. For more information,
see
"Log class (Flash Professional only)" on page
1414.
Returns
Nothing.
Description
Constructor function; creates a WebService object. When you call
, you
new WebService()
provide a WSDL URL, and Flash Player returns a WebService object. The constructor can
optionally accept a proxy URI and a Log object.
If you want, you can use two callbacks for the WebService object. Flash Player calls
when it finishes parsing the WSDL file and the object is
webServiceObject.onLoad
complete. This is a good place to put code you want to execute only after the WSDL file has
been completely parsed. For example, you might choose to put your first web service method
call in this function.
Flash Player calls
when an error occurs in finding or parsing the
webServiceObject.onFault
WSDL file. This is a good place to put debugging code and code that tells users that the server
is unavailable, that they should try again later, or similar information. For more information,
see the individual entries for these functions.
Invoking a web service operation
You invoke a web service operation as a method directly
available on the web service. For example, if your web service has the method
, you would invoke the method in the following manner:
getCompanyInfo(tickerSymbol)
myPendingCallObject = myWebServiceObject.getCompanyInfo(tickerSymbol);
In this example, the callback object is named
. All method invocations
myPendingCallObject
are asynchronous, and return a callback object of type
. (Asynchronous means
PendingCall
that the results of the web service call are not available immediately.)
Consider the following call:
x = stockService.getQuote("macr");
When you make this call, the object
is not the result of
; it's a PendingCall object.
x
getQuote
The actual results are only available later, when the web service operation completes. Your
ActionScript code is notified by a call to the
callback function.
onResult
1442
Web service classes (Flash Professional only)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents