Search in sources :

Example 11 with XMLElement

use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.

the class SoapDynamicGroup method reload.

public void reload(SoapProvisioning prov) throws ServiceException {
    XMLElement req = new XMLElement(AdminConstants.GET_DISTRIBUTION_LIST_REQUEST);
    Element a = req.addElement(AdminConstants.E_DL);
    a.setText(getId());
    a.addAttribute(AdminConstants.A_BY, Key.DistributionListBy.id.name());
    Element dl = prov.invoke(req).getElement(AdminConstants.E_DL);
    Map<String, Object> attrs = SoapProvisioning.getAttrs(dl);
    addDlm(dl, attrs);
    setAttrs(attrs);
}
Also used : XMLElement(com.zimbra.common.soap.Element.XMLElement) Element(com.zimbra.common.soap.Element) XMLElement(com.zimbra.common.soap.Element.XMLElement)

Example 12 with XMLElement

use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.

the class SoapServer method modifyAttrs.

public void modifyAttrs(SoapProvisioning prov, Map<String, ? extends Object> attrs, boolean checkImmutable) throws ServiceException {
    XMLElement req = new XMLElement(AdminConstants.MODIFY_SERVER_REQUEST);
    req.addElement(AdminConstants.E_ID).setText(getId());
    SoapProvisioning.addAttrElements(req, attrs);
    setAttrs(SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminConstants.E_SERVER)));
}
Also used : XMLElement(com.zimbra.common.soap.Element.XMLElement)

Example 13 with XMLElement

use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.

the class SoapServer method reload.

public void reload(SoapProvisioning prov) throws ServiceException {
    XMLElement req = new XMLElement(AdminConstants.GET_SERVER_REQUEST);
    Element a = req.addElement(AdminConstants.E_SERVER);
    a.setText(getId());
    a.addAttribute(AdminConstants.A_BY, Key.ServerBy.id.name());
    setAttrs(SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminConstants.E_SERVER)));
}
Also used : XMLElement(com.zimbra.common.soap.Element.XMLElement) Element(com.zimbra.common.soap.Element) XMLElement(com.zimbra.common.soap.Element.XMLElement)

Example 14 with XMLElement

use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.

the class SoapConfig method reload.

public void reload(SoapProvisioning prov) throws ServiceException {
    XMLElement req = new XMLElement(AdminConstants.GET_ALL_CONFIG_REQUEST);
    setAttrs(SoapProvisioning.getAttrs(prov.invoke(req)));
}
Also used : XMLElement(com.zimbra.common.soap.Element.XMLElement)

Example 15 with XMLElement

use of com.zimbra.common.soap.Element.XMLElement in project zm-mailbox by Zimbra.

the class SoapDomain method reload.

public void reload(SoapProvisioning prov) throws ServiceException {
    XMLElement req = new XMLElement(AdminConstants.GET_DOMAIN_REQUEST);
    Element a = req.addElement(AdminConstants.E_DOMAIN);
    a.setText(getId());
    a.addAttribute(AdminConstants.A_BY, Key.DomainBy.id.name());
    setAttrs(SoapProvisioning.getAttrs(prov.invoke(req).getElement(AdminConstants.E_DOMAIN)));
}
Also used : XMLElement(com.zimbra.common.soap.Element.XMLElement) Element(com.zimbra.common.soap.Element) XMLElement(com.zimbra.common.soap.Element.XMLElement)

Aggregations

XMLElement (com.zimbra.common.soap.Element.XMLElement)146 Element (com.zimbra.common.soap.Element)116 JSONElement (com.zimbra.common.soap.Element.JSONElement)33 Test (org.junit.Test)32 XmlAnyElement (javax.xml.bind.annotation.XmlAnyElement)28 XmlElement (javax.xml.bind.annotation.XmlElement)28 FilterTest (com.zimbra.soap.mail.type.FilterTest)26 SoapHttpTransport (com.zimbra.common.soap.SoapHttpTransport)9 HashMap (java.util.HashMap)8 KeyValuePair (com.zimbra.soap.type.KeyValuePair)7 ArrayList (java.util.ArrayList)7 Account (com.zimbra.cs.account.Account)6 ZAuthToken (com.zimbra.common.auth.ZAuthToken)5 ByteBuilder (com.zimbra.common.mime.HeaderUtils.ByteBuilder)4 ServiceException (com.zimbra.common.service.ServiceException)4 DataSource (com.zimbra.cs.account.DataSource)4 Auth (com.zimbra.cs.service.account.Auth)4 URL (java.net.URL)4 Cookie (javax.servlet.http.Cookie)4 HttpException (org.apache.http.HttpException)4