cn.addAttribute((String) entry.getKey(), (String) entry.getValue(), Element.DISP_ELEMENT);
cn.addElement(MailService.E_ATTRIBUTE) .addAttribute(MailService.A_ATTRIBUTE_NAME, (String) entry.getKey()) .setText((String) entry.getValue());
    public static void addContact(Element response, GalContact contact) throws ServiceException {        Element cn = response.addElement(MailService.E_CONTACT);        cn.addAttribute(MailService.A_ID, contact.getId());        Map attrs = contact.getAttrs();        for (Iterator it = attrs.entrySet().iterator(); it.hasNext();) {            Map.Entry entry = (Entry) it.next();            Object value = entry.getValue();            if (value instanceof String[]) {                String sa[] = (String[]) value;                for (int i = 0; i < sa.length; i++) {                    cn.addAttribute((String) entry.getKey(), sa[i], Element.DISP_ELEMENT);                }            } else {                cn.addAttribute((String) entry.getKey(), (String) entry.getValue(), Element.DISP_ELEMENT);            }        }    }