String id = invoke(req).getElement(MailService.E_FOLDER).getAttribute(MailService.A_ID);  return getFolderById(id);
Element newFolderEl = invoke(req).getElement(MailService.E_FOLDER); ZFolder newFolder = getFolderById(newFolderEl.getAttribute(MailService.A_ID)); return newFolder != null ? newFolder : new ZFolder(newFolderEl, null);
    public ZFolder createFolder(String parentId, String name, ZFolder.View defaultView, ZFolder.Color color, String flags, String url) throws ServiceException {        XMLElement req = new XMLElement(MailService.CREATE_FOLDER_REQUEST);        Element folderEl = req.addElement(MailService.E_FOLDER);        folderEl.addAttribute(MailService.A_NAME, name);        folderEl.addAttribute(MailService.A_FOLDER, parentId);        if (defaultView != null) folderEl.addAttribute(MailService.A_DEFAULT_VIEW, defaultView.name());        if (color != null) folderEl.addAttribute(MailService.A_COLOR, color.getValue());        if (flags != null) folderEl.addAttribute(MailService.A_FLAGS, flags);        if (url != null && url.length() > 0) folderEl.addAttribute(MailService.A_URL, url);        String id = invoke(req).getElement(MailService.E_FOLDER).getAttribute(MailService.A_ID);        // this assumes notifications will create the folder        return getFolderById(id);    }