Класс, наследник mx.services.WebService

Код:
/**
* Base Class For Web Service Page
* (c) ...
*
*/
import mx.services.WebService;
class WebServicePage
{
/**
* Current Session Id
*
*/
public static var SID;
/**
* Web Service URL
*
*/
private static var serviceURL;
/**
* Inner CallBack Object For SOAP functions
*
*/
public var callBack:Object = new Object();
/**
* Link to "this" for callback object
*/
public var service:WebServicePage;
/**
* Parent Movie Clip For New Page View
*
*/
var parentMovie:MovieClip;
public function WebServicePage(_parentMovie) {
parentMovie = _parentMovie;
if (!serviceURL) {
if (_root.wsdl) {
serviceURL = _root.wsdl + '?wsdl';
} else {
serviceURL = 'http://127.0.0.1/ig-php/server.php?wsdl';
}
}
this.prototype = new _global.mx.services.WebService(serviceURL);
if (!WebServicePage.SID) {
Вот тут то и нужно гарантировано дождаться результата....

Код:
// Init session trigger
this.accessRemote('init');
}
this.service = this;
}
/**
* Execute SOAP call
*
*/
public function accessRemote(methodName:String, obj:Object)
{
this.callBack = this.prototype[methodName](WebServicePage.SID, obj);
this.callBack.resultFunction = this[methodName add '_onResult'];
this.callBack.statusFunction = this[methodName add '_onFault'];
this.callBack.service = this.service;
if (!this.callBack.statusFunction) {
this.callBack.statusFunction = this['default_onFault'];
}
this.callBack.onResult = function(result){
this.resultFunction(result);
}
this.callBack.onFault = function(status){
this.statusFunction(status);
}
}
/**
* Store Session ID
*
*/
function init_onResult(data)
{
WebServicePage.SID = data;
trace('SessionID = ' add data);
}
function init_onFault(data)
{
WebServicePage.SID = 'fault';
trace('Session fault');
}
function default_onFault(code) {
trace('WEBSERVICE FAULT!');
for(var a in code) {
trace([a,code[a]]);
}
}
/**
* Unserialize SOAP results
*
*/
public function unserialize(data)
{
for (var aNode:XMLNode = data.firstChild; aNode != null; aNode = aNode.nextSibling) {
this[aNode.nodeName] = aNode.firstChild.nodeValue;
}
}
}
Использовать WebServiceConnector.trigger - нихрена не помогает!