SearchGalResult result = prov.getDomain(acct).autoCompleteGal(n, type, max);
SearchGalResult result = prov.autoCompleteGal(prov.getDomain(acct), n, type, max);
    public Element handle(Element request, Map<String, Object> context) throws ServiceException {        String n = request.getAttribute(AccountService.E_NAME);        ZimbraSoapContext lc = getZimbraSoapContext(context);        Element response = lc.createElement(AccountService.AUTO_COMPLETE_GAL_RESPONSE);        Account acct = getRequestedAccount(getZimbraSoapContext(context));        while (n.endsWith("*"))            n = n.substring(0, n.length() - 1);        String typeStr = request.getAttribute(AccountService.A_TYPE, "account");        int max = (int) request.getAttributeLong(AccountService.A_LIMIT);        Provisioning.GAL_SEARCH_TYPE type;        if (typeStr.equals("all"))            type = Provisioning.GAL_SEARCH_TYPE.ALL;        else if (typeStr.equals("account"))            type = Provisioning.GAL_SEARCH_TYPE.USER_ACCOUNT;        else if (typeStr.equals("resource"))            type = Provisioning.GAL_SEARCH_TYPE.CALENDAR_RESOURCE;        else            throw ServiceException.INVALID_REQUEST("Invalid search type: " + typeStr, null);                Provisioning prov = Provisioning.getInstance();        SearchGalResult result = prov.getDomain(acct).autoCompleteGal(n, type, max);        response.addAttribute(AccountService.A_MORE, result.hadMore);                for (GalContact contact : result.matches)            addContact(response, contact);        return response;    }