ActionScript 2.0 Components Language Reference |
|
|
|
| Web service classes > WebService.myMethodName() | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
callbackObj=myWebServiceObject.myMethodName(param1, ...paramN);
param1, ... paramN Various parameters, depending on the web service method that is called.
A PendingCall object to which you can attach a function for handling results and errors on the invocation. For more information, see PendingCall class.
The callback invoked when the response comes back from the WebService method is PendingCall.onResult or PendingCall.onFault. By uniquely identifying your callback objects, you can manage multiple onResult callbacks, as in the following example:
myWebService = new WebService("http://www.myCompany.com/myService.wsdl");
callback1 = myWebService.getWeather("02451");
callback1.onResult = function(result)
{
// do something
}
callback2 = myWebService.getDetailedWeather("02451");
callback2.onResult = function(result)
{
// do something else
}
Method; invokes a web service operation. You invoke the method directly on the web service. For example, if your web service has the method getCompanyInfo(tickerSymbol), you would make the following call:
myCallbackObject.myservice.getCompanyInfo(tickerSymbol);
All invocations are asynchronous, and return a callback object of type PendingCall.
|
|
|
|