I'm making a couple of SOAP requests through Javascript. Ones to namespaces such as zimbraAccount work fine. The zimbraAdmin namespace works fine in the CLI, but I consistently get a 500 response from the server when they are made through Javascript. Even ones that are very simple, such as
Code:
com_ia_crm.prototype.getAllMailboxes = function() {
	var soapRequest = "GetAllMailboxesRequest";
	var soapNamespace = "urn:zimbraAdmin";
	var mySoapDoc = AjxSoapDoc.create(soapRequest, soapNamespace);
	var params = {
			soapDoc : mySoapDoc,
			asyncMode : true,
			callback : (new AjxCallback(this, this.handleMailboxes)),
			errorCallback : (new AjxCallback(this, this.mailboxesError))
	};
	appCtxt.getAppController().sendRequest(params);
};
are failing.

Another example is
Code:
com_ia_crm.prototype.__getZimbraAccountID = function(msg) {
	var soapRequest = "GetAccountInfoRequest";
	var soapNamespace = "urn:zimbraAccount";
	//var soapNamespace = "urn:zimbraAdmin";
	var soapDoc = AjxSoapDoc.create(soapRequest, soapNamespace);
	var accountNode = soapDoc.set("account", appCtxt.getUsername());
	accountNode.setAttribute("by", "name");

	var params = {
			soapDoc : soapDoc,
			asyncMode : true,
			callback : (new AjxCallback(this, this.__handleZimbraAccountIDResponse, msg)),
			errorCallback : (new AjxCallback(this,
					this.__handleSOAPErrorResponseXML))
	};

	appCtxt.getAppController().sendRequest(params);
};
This runs fine as I've posted it, but if I switch which declaration of soapNamespace is commented out (and make no other changes), I get the unknown document response.

I've poured over the SOAP API and can't figure out where I'm going wrong. Any clues will be much appreciated.