User Guide

874 Chapter 6: Components Dictionary
Example
The following example defines a function statusFunction for the status event and assigns the
function to the
addEventListener event handler:
var statusFunction = function (stat) {
trace(stat.code);
trace(stat.data.faultcode);
trace(stat.data.faultstring);
};
wsc.addEventListener("status", statusFunction);
WebServiceConnector.suppressInvalidCalls
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
componentInstance.suppressInvalidCalls
Description
Property; indicates whether to suppress a call if parameters are invalid. If this property is true, the
trigger() method does not perform a call if the bound parameters fail the validation. A status
event is emitted, with the code
InvalidParams. If this property is false, the call takes place,
using the invalid data as required.
Example
This example displays an error because the required parameters are not being passed. 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 stat:Function = function (error:Object) {
switch (error.code) {
case 'InvalidParams' :
trace("Unable to connect to remote Web Service: "+error.code);
break;
Unknown.Call.Failure WebService invocation failed
for unknown reasons
Client.Disconnected Could not load imported
schema
Unable to load schema; if
currently online, please verify
the URI and/or format of the
schema at (XXXX)
faultcode faultstring detail