rem: if (this._fault) throw Components.Exception('XML-RPC Fault', null, null, this._fault); else return this._result; 
context:     call: function(methodName) {        debug('call');        // Check for call in progress.        if (this._inProgress)            throw Components.Exception('Call in progress!');                // Check for the server URL;        if (!this._serverUrl)            throw Components.Exception('Not initilized');        this._inProgress = true;        // Clear state.        this._status = null;        this._errorMsg = null;        var methodArgs = [].concat(arguments);        methodArgs.shift();        debug('Arguments: ' + methodArgs);        // Generate request body        var xmlWriter = new XMLWriter();        this._generateRequestBody(xmlWriter, methodName, methodArgs);        var requestBody = xmlWriter.data;        debug('Request: ' + requestBody);        var channel = this._getChannel(requestBody);        debug('Do the deed.');        var input = channel.openInputStream();        input = toScriptableStream(input);                var now = new Date()        // This is broken! See bug 11859        // yes, if we use asyncCall on ourselves, we still don't        // work. Valeski calls this an event pump blocking problem.        while (!input.available()) { // Wait for data            if (new Date() - now > 1 * 60 * 1000)                throw Components.Exception('Connection timed out');        }                this._reponseStatus = channel.ResponseStatus;        this._responseString = channel.ResponseString;        // Check for a 200 response.        if (channel.ResponseStatus != 200) {            this._status = Components.results.NS_ERROR_FAILURE;            this._errorMsg = 'Server returned unexpected status ' +                channel.ResponseStatus;            this._inProgress = false;            throw Components.Exception('Server returned unexpected status ' +                        channel.ResponseStatus);        }        // check content type        if (channel.contentType != 'text/xml') {            this._status = Components.results.NS_ERROR_FAILURE;            this._errorMsg = 'Server returned unexpected content-type ' +                channel.contentType;            this._inProgress = false;            throw Components.Exception('Server returned unexpected ' +                'content-type ' + channel.contentType);        }        debug('Viable response. Let\'s parse!');        debug('Content length = ' + channel.contentLength);                try {            this._parseResponse(toScriptableStream(inStr),                channel.contentLength);            debug('Parse finished');            debug('Fault? ' + this._fault);            debug('Result? ' + this._result);            if (this._fault)                throw Components.Exception('XML-RPC Fault', null, null,                    this._fault);            else                return this._result;        } catch(ex) {            this._status = ex.result;            this._errorMsg = ex.message;            ctxt.listener.onError(this, ctxt.context, ex.result, ex.message);        } finally {            this._inProgress = false;        }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fd4c2c44850f86022eb83c5542eee309bceb5f61/nsXmlRpcClient.js/clean/extensions/xml-rpc/src/nsXmlRpcClient.js