User Guide

876 Chapter 6: Components Dictionary
The trigger() method performs the following steps:
1.
If any data is bound to the params property, the method executes all the bindings to ensure that
up-to-date data is available. This also causes data validation to occur.
2.
If the data is not valid and suppressInvalidCalls is set to true, the operation is
discontinued.
3.
If the operation continues, the send event is emitted.
4.
The actual remote call is initiated using the connection method indicated (for example, HTTP).
Example
This example returns data from a remote web service and traces a tip. Drag a
WebServiceConnector component into your library, and enter the following code on Frame 1 of
the Timeline:
import mx.data.components.WebServiceConnector;
var res:Function = function (evt:Object) {
trace(evt.target.results);
};
var wsConn:WebServiceConnector = new WebServiceConnector();
wsConn.addEventListener("result", res);
wsConn.WSDLURL = "http://www.flash-mx.com/mm/tips/tips.cfc?wsdl";
wsConn.operation = "getTipByProduct";
wsConn.params = ["Flash"];
wsConn.suppressInvalidCalls = true;
wsConn.trigger();
WebServiceConnector.WSDLURL
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
componentInstance.WSDLURL
Description
Property; the URL of the WSDL file that defines the web service operation. When you set this
URL while authoring, the WSDL file is immediately fetched and parsed. The resulting
parameters and results appear in the Schema tab of the Component inspector. The service
description also appears in the Web Service panel.
Example
This example returns data from a remote web service and traces a tip. Drag a
WebServiceConnector component into your library, and enter the following code on Frame 1 of
the Timeline:
import mx.data.components.WebServiceConnector;