XMLConnector.status

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

componentInstance.addEventListener("status", myListenerObject)

Description

Event; broadcast when a remote procedure call is initiated, to inform the user of the status of the operation.

The parameter to the event handler is an object with the following fields:

The code field for the status event is set to Fault if problems occur with the call, as follows:

Code

Data

Description

Fault

{faultcode: code,

faultstring: string,

detail: detail,

element: element,

faultactor: actor}

This event is emitted if other problems occur during the processing of the call. The data is a SOAPFault object. After this event occurs, the attempted call is considered complete, and there is no result or send event.

The following are the faults that can occur with the status event:

FaultCode

FaultString

Notes

XMLConnector.Not.XML

params is not an XML object

The params value must be an ActionScript XML object.

XMLConnector.Parse.Error

params had XML parsing error NN.

The status property of the params XML object had a nonzero value NN. To see the possible errors NN, see XML.status in ActionScript 2.0 Language Reference.

XMLConnector.No.Data.Received

no data was received from the server

Due to various browser limitations, this message can mean either (a) the server URL was invalid, did not respond, or returned an HTTP error code; or (b) the server request succeeded but the response was 0 bytes of data. To work around this restriction, design your application so that the server never returns 0 bytes of data. If you receive the fault code XMLConnector.No.Data.Received, you will know that there was a server error, and can inform the user accordingly.

XMLConnector.Results.Parse.Error

received data had an XML parsing error NN

The received XML was not valid, as determined by the Flash Player built-in XML parser. To see the possible errors NN, see XML.status in ActionScript 2.0 Language Reference.

XMLConnector.Params.Missing

Direction is 'send' or 'send/receive', but params are null.

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);
};
xcon.addEventListener("status", statusFunction);