Search in sources :

Example 1 with GetLicenseInfoResponse

use of com.zimbra.soap.admin.message.GetLicenseInfoResponse in project zm-mailbox by Zimbra.

the class GetLicenseInfo method handle.

@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
    ZimbraSoapContext lc = getZimbraSoapContext(context);
    String expirationDate = LC.get(TRIAL_EXPIRATION_DATE_KEY);
    LicenseExpirationInfo expirationInfo = new LicenseExpirationInfo(expirationDate);
    GetLicenseInfoResponse resp = new GetLicenseInfoResponse(expirationInfo);
    return lc.jaxbToElement(resp);
}
Also used : LicenseExpirationInfo(com.zimbra.soap.admin.type.LicenseExpirationInfo) ZimbraSoapContext(com.zimbra.soap.ZimbraSoapContext) GetLicenseInfoResponse(com.zimbra.soap.admin.message.GetLicenseInfoResponse)

Example 2 with GetLicenseInfoResponse

use of com.zimbra.soap.admin.message.GetLicenseInfoResponse in project zm-mailbox by Zimbra.

the class TestJaxbProvisioning method testLicenseInfo.

@Test
public void testLicenseInfo() throws Exception {
    ZimbraLog.test.debug("Starting testLicenseInfo");
    GetLicenseInfoRequest req = new GetLicenseInfoRequest();
    GetLicenseInfoResponse resp = prov.invokeJaxb(req);
    assertNotNull("GetLicensInfoResponse", resp);
    LicenseExpirationInfo expires = resp.getExpiration();
    assertNotNull("Expiration Info", expires);
    assertNotNull("getDate result", expires.getDate());
}
Also used : LicenseExpirationInfo(com.zimbra.soap.admin.type.LicenseExpirationInfo) GetLicenseInfoRequest(com.zimbra.soap.admin.message.GetLicenseInfoRequest) GetLicenseInfoResponse(com.zimbra.soap.admin.message.GetLicenseInfoResponse) Test(org.junit.Test)

Aggregations

GetLicenseInfoResponse (com.zimbra.soap.admin.message.GetLicenseInfoResponse)2 LicenseExpirationInfo (com.zimbra.soap.admin.type.LicenseExpirationInfo)2 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)1 GetLicenseInfoRequest (com.zimbra.soap.admin.message.GetLicenseInfoRequest)1 Test (org.junit.Test)1