WebServiceConnector.operation

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

componentInstance.operation;

Description

Property; the name of an operation that appears within the SOAP port in a WSDL file.

Example

This example returns data from a remote web service and traces a tip and how long the service takes to return the data to the SWF file. Drag a WebServiceConnector component into your library, and enter the following code on Frame 1 of the timeline:

import mx.data.components.WebServiceConnector;

var startTime:Number;
var wscListener:Object = new Object();
wscListener.result = function(evt:Object) {
var resultTimeMS:Number = getTimer()-startTime;
trace("result loaded in "+resultTimeMS+" ms.");
trace(evt.target.results);
};
wscListener.send = function(evt:Object) {
startTime = getTimer();
};
var wsConn:WebServiceConnector = new WebServiceConnector();
wsConn.addEventListener("result", wscListener);
wsConn.addEventListener("send", wscListener);
wsConn.WSDLURL = "http://www.flash-mx.com/mm/tips/tips.cfc?wsdl";
wsConn.operation = "getTipByProduct";
wsConn.params = ["Flash"];
wsConn.suppressInvalidCalls = true;
wsConn.multipleSimultaneousAllowed = false;
wsConn.trigger();