add:  if (this.getUsername()) { req.setUsername(this.getUsername()); req.setPassword(this.getPassword()); } 
context: qx.Proto._callInternal = function(args, async, refreshSession) {  var self = this;  var offset = 0;  var handler = args[0];  if (async) {    offset = 1;  }  var whichMethod = (refreshSession ? "refreshSession" : args[offset]);  var argsArray = [];  for (var i = offset + 1; i < args.length; ++i) {    argsArray.push(args[i]);  }  var req = new qx.io.remote.RemoteRequest(this.getUrl(),                                           qx.constant.Net.METHOD_POST,                                           qx.constant.Mime.JSON);  var requestObject = {    "service": (refreshSession ? null : this.getServiceName()),    "method": whichMethod,    "id": req.getSequenceNumber(),    "params": argsArray    // additional field 'server_data' optionally included, below  }  // See if there's any out-of-band data to be sent to the server  var serverData = this.getServerData();  if (serverData !== undefined) {    // There is.  Send it.    requestObject.server_data = serverData;  }  req.setCrossDomain(this.getCrossDomain());  req.setTimeout(this.getTimeout());  var ex = null;  var id = null;  var result = null;  var handleRequestFinished = function() {    if (async) {      handler(result, ex, id);    }  }  var makeException = function(origin, code, message) {    var ex = new Object();    ex.origin = origin;    ex.code = code;    ex.message = message;    ex.toString = function() {      switch(origin)      {      case qx.io.remote.Rpc.origin.server:        return "Server error " + this.code + ": " + this.message;      case qx.io.remote.Rpc.origin.application:        return "Application error " + this.code + ": " + this.message;      case qx.io.remote.Rpc.origin.transport:        return "Transport error " + this.code + ": " + this.message;      case qx.io.remote.Rpc.origin.local:        return "Local error " + this.code + ": " + this.message;      default:        return "UNEXPECTED origin " + this.origin + " error " + this.code + ": " + this.message;      }    }    return ex;  }  req.addEventListener("failed", function(evt) {    var code = evt.getData().getStatusCode();    ex = makeException(qx.io.remote.Rpc.origin.transport,                       code,                       qx.io.remote.RemoteExchange.statusCodeToString(code));    id = this.getSequenceNumber();    handleRequestFinished();  });  req.addEventListener("timeout", function(evt) {    ex = makeException(qx.io.remote.Rpc.origin.local,                       qx.io.remote.Rpc.localError.timeout,                       "Local time-out expired");    id = this.getSequenceNumber();    handleRequestFinished();  });  req.addEventListener("aborted", function(evt) {    ex = makeException(qx.io.remote.Rpc.origin.local,                       qx.io.remote.Rpc.localError.abort,                       "Aborted");    id = this.getSequenceNumber();    handleRequestFinished();  });  req.addEventListener("completed", function(evt) {    result = evt.getData().getContent();    id = result["id"];    if (id != this.getSequenceNumber()) {      this.warn("Received id (" + id + ") does not match requested id (" + this.getSequenceNumber + ")!");    }    var exTest = result["error"];    if (exTest != null) {      result = null;      ex = makeException(exTest.origin, exTest.code, exTest.message);    } else {      result = result["result"];      if (refreshSession) {        result = eval("(" + result + ")");        var newSuffix = qx.core.ServerSettings.serverPathSuffix;        if (self._currentServerSuffix != newSuffix) {          self._previousServerSuffix = self._currentServerSuffix;          self._currentServerSuffix = newSuffix;        }        self.setUrl(self.fixUrl(self.getUrl()));      }    }    handleRequestFinished();  });  req.setData(qx.io.Json.stringify(requestObject));  req.setAsynchronous(async);  if (req.getCrossDomain()) {    // Our choice here has no effect anyway.  This is purely informational.    req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");  } else {    // When not cross-domain, set type to text/json    req.setRequestHeader("Content-Type", "text/json");  }  req.send();  if (!async) {      if (ex != null) {        throw ex;      }      return result;  } else {    return req;  }}
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/c75f3d51407666581cfa54bc0b2024c3dc59f49e/Rpc.js/buggy/qooxdoo/frontend/framework/source/class/qx/io/remote/Rpc.js