if (sortBy != null) req.addAttribute(MailService.A_SORTBY, sortBy.name()); if (sync) req.addAttribute(MailService.A_SYNC, sync);  if (attrs != null) { for (String name : attrs) req.addElement(MailService.E_ATTRIBUTE).addAttribute(MailService.A_ATTRIBUTE_NAME, name); }
    public List<ZContact> getAllContacts(String optFolderId) throws ServiceException {        XMLElement req = new XMLElement(MailService.GET_CONTACTS_REQUEST);        if (optFolderId != null)             req.addAttribute(MailService.A_FOLDER, optFolderId);        Element response = invoke(req);        List<ZContact> result = new ArrayList<ZContact>();        for (Element cn : response.listElements(MailService.E_CONTACT)) {            result.add(new ZSoapContact(cn));        }        return result;    }