code: function XmlRpcFault(fault_code, fault_string) {
      this.method = false;
      this.is_fault = true;
      this.params = [{
          faultString: fault_string,
          faultCode: fault_code
      }];
  }
docs: Expects a fault code and message string:  var fault = new XMLRPC.Fault(404, "Method not found"); var xml = msg.xml();