You are here: Entitlement Management > Entitlement > getEntitlementCertificateHTML

Retrieve Entitlement Certificate as HTML

Description

View entitlement certificate in HTML format for a given entitlement ID.The entitlement should be in the Complete stage.

Default Protocol Method Type URI
HTTPS GET getEntitlementCertificateHTML.xml

Query Parameters

Parameter Description Valid Values Optional
entId

Identifier of the entitlement.

Note: The entId is the handle returned by the createEntitlement.xml web service. You can use the searchEntitlements.xml web service to retrieve entId for an entitlement.

Integer (>0) No

Sample Code

import java.io.IOException;
import java.net.URLDecoder;
//..............................
//..............................
//..............................
import org.apache.http.params.HttpParams;
public class EMSSample {
        private static DefaultHttpClient httpclient = new DefaultHttpClient();
        private static Principal principal = null;
        private static StringBuffer query;
        //..............................
        //..............................
        //..............................
        public static String getEntitlementCertificateHTML.xml()throws Exception {
                if(!verifyLogin()){
                        return "login failed";
                }
                HttpContext context = new BasicHttpContext();
                context.setAttribute(ClientContext.USER_TOKEN, principal);
                HttpGet get = new HttpGet("https://localhost:8443/ems/3.6/getEntitlementCertificateHTML.xml");
                query = new StringBuffer();
                setParameter("entId", "");
                get.setURI(new URI(URLDecoder.decode(get.getURI() + query.toString(),"UTF-8")));
                HttpResponse response = httpclient.execute(get, context);
                HttpEntity entity = response.getEntity();
                byte[] b = null;
                if (entity != null) {
                        long l = entity.getContentLength();
                        b = new byte[(int) l];
                        entity.getContent().read(b);
                        entity.consumeContent();
                }
                return new String(b);
        }
        static void setParameter(String key, String value) {
                if (query.toString().equals("")) {
                        query.append("?" + key + "=" + value + "&");
                } else {
                        query.append(key + "=" + value + "&");
                }
        }
}

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><emsResponse><stat>ok</stat><entCert>&lt;STYLE&gt;.gridTable {BORDER-RIGHT: #d4d0c8 2px solid; BORDER-TOP: #d4d0c8 2px solid; FONT-SIZE: 10pt; BORDER-LEFT: #d4d0c8 2px solid; WIDTH: 100%; BORDER-BOTTOM: #d4d0c8 2px solid; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse}&#xD; .noHover1 tr:hover, tr.noHover:hover, tr.noHover { background:#fff }&#xD; .ent-contTable1 { border-top:0px solid #cdcccc; border-left:1px solid #cdcccc; border-right:1px solid #cdcccc; margin-bottom:0px; color:#555; }&#xD; .ent-contTable1 th, .ent-contTable1 td { text-align:left; padding:6px 12px; border-bottom:1px solid #cdcccc; }&#xD; .ent-contTable1 table { line-height:18px; margin-bottom:0 }&#xD; .ent-contTable1 td.rtAln { text-align:right }&#xD; .ent-homeTable1 { width:100%; border:0; color:#555; }&#xD; .ent-homeTable1 th, .ent-homeTable1 td { text-align:left; padding:7px 14px; border-bottom:1px solid #e8edf3; }&#xD; .ent-homeTable1 th { background:#E1D7E0; color:#555; }&#xD; .ent-homeTable1 .status { margin:0 5px -2px 0 }&#xD; .ent-homeTable1 label { font-weight:bold; text-align:right }&#xD; .ent-homeTable1 .selectedRow{background:#824882;color:#FFFFFF;}&#xD; .ent-menu_head {display:block;position:relative;}&#xD; .ent-contAcrTop {&#xD; background-color:#6F396E;&#xD; border-bottom:1px solid #C0C0C0;&#xD; margin-top:10px;}&#xD; .ent-contAcrTopInr { background-color:#6F396E; height:30px; border-top:1px solid #cccccc; border-left:1px solid #cccccc;border-right:1px solid #cccccc; }&#xD; .ent-subcontAcrTopInr { background-color:#E1D7E0; height:30px; border-top:1px solid #cccccc; border-left:1px solid #cccccc;border-right:1px solid #cccccc; }&#xD; &#xD; .ent-contAcrTopInr label {background-color:#6F396E; padding-left:15px; font-weight:bold ; }&#xD; .ent-contAcrTopInr label.noBg { background:none; padding-left:0 }&#xD; .ent-contSubTitle { font-size:15px; font-weight:bold; display:inline-block;color:#fff; }&#xD; .ent-contTitle { font-size:15px; font-weight:bold; display:inline-block;color:#555; }&#xD; &#xD; &#xD; &lt;/STYLE&gt;&#xD; &lt;div class=&quot;ent-contAcrTop ent-menu_head&quot;&gt;&#xD; &lt;div class=&quot;ent-subcontAcrTopInr&quot;&gt; &#xD; &lt;label id=&quot;labelentitlementDetails&quot; class=&quot;ent-contTitle&quot;&gt;&lt;span class=&quot;padding-left:10px;&quot;&gt;Entitlement Details&lt;/span&gt;&lt;/label&gt;&#xD; &lt;/div&gt;&#xD; &lt;/div&gt;&#xD; &lt;div class=&quot;ent-contTable1&quot; &gt;&#xD; &lt;table width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; class=&quot;ent-homeTable1 noHover1 &quot;&gt;&#xD; &lt;TBODY&gt; &#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;width:20%;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;EID:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;width:30%&quot;&gt;&lt;span id=&quot;eid&quot;&gt;9486367e-79f8-4a67-aee7-b04f1edb84a0&lt;/span&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;width:25%;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Entitlement Type:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;width:25%&quot;&gt;&lt;span id=&quot;entitlementType&quot;&gt;Enterprise &lt;/span&gt;&#xD; &lt;/tr&gt;&#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Start Date:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;span id=&quot;startdate&quot;&gt;05/02/2014&lt;/span&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;End Date:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td &gt;&lt;span id=&quot;enddate&quot;&gt;Never Expires&lt;/span&gt;&lt;/td&gt;&#xD; &lt;/tr&gt;&#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;RefID 1:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;div style=&quot;word-wrap:break-word;width:12em;&quot;&gt;&lt;span id=&quot;refId1&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;RefID 2:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;div style=&quot;word-wrap:break-word;width:12em;&quot;&gt;&lt;span id=&quot;refId2&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&#xD; &lt;/tr&gt;&#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Contact E-mail:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;span id=&quot;contactEmail&quot;&gt;NewEL@NewEL.com&lt;/span&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Customer Name:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td &gt;&lt;span id=&quot;customerName&quot;&gt;NewEL&lt;/span&gt;&lt;/td&gt;&#xD; &lt;/tr&gt;&#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Customer Ref ID:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td colspan=&quot;1&quot;&gt;&lt;div style=&quot;word-wrap:break-word;&quot;&gt;&lt;span id=&quot;customerCRM&quot;&gt;NewEL&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&#xD; &#xD; &lt;td style=&quot;padding-right:4px;display:;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Feature Caching Mode:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;display:;&quot;&gt;&lt;div style=&quot;word-wrap:break-word;&quot;&gt;&lt;span id=&quot;featureCachingMode&quot;&gt;Entitlement Level&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&#xD; &#xD; &lt;/tr&gt;&#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Customer Time Zone:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td colspan=&quot;3&quot;&gt;&lt;span id=&quot;customerTz&quot;&gt;(GMT) Greenwich Mean Time, : Dublin, Edinburgh, Lisbon, London&lt;/span&gt;&lt;/td&gt;&#xD; &lt;/tr&gt; &#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Deployment Type:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;span id=&quot;deploymentType&quot;&gt;On-Premise&lt;/span&gt;&lt;/td&gt;&#xD; &#xD; &#xD; &#xD; &#xD; &lt;td style=&quot;padding-right:4px;display:;&quot; align=&quot;left&quot;&gt;&lt;b&gt;Station Count:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;display:;&quot; align=&quot;left&quot;&gt;&lt;span id=&quot;stationCount&quot;&gt;31&lt;/span&gt;&lt;/td&gt;&#xD; &#xD; &#xD; &#xD; &lt;/tr&gt;&#xD; &#xD; &lt;tr&gt;&#xD; &lt;td style=&quot;padding-right:4px;&quot; align=&quot;right&quot;&gt;&lt;b&gt;Detach Interval:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td&gt;&lt;span id=&quot;detachInterval&quot;&gt;Never Expires&lt;/span&gt;&lt;/td&gt;&#xD; &#xD; &#xD; &lt;td style=&quot;padding-right:4px;display:;&quot; align=&quot;left&quot;&gt;&lt;b&gt;Usage Collection:&lt;/b&gt;&lt;/td&gt;&#xD; &lt;td style=&quot;display:;&quot; align=&quot;left&quot;&gt;&lt;span id=&quot;usageEnabled&quot;&gt;Off&lt;/span&gt;&lt;/td&gt;&#xD; &#xD; &lt;/tr&gt;&#xD; &#xD; &lt;/TBODY&gt; &#xD; &lt;/table&gt;&#xD; &lt;/div&gt;&#xD; &lt;div class=&quot;ent-contAcrTop ent-menu_head&quot;&gt;&#xD; &lt;div class=&quot;ent-subcontAcrTopInr&quot;&gt; &#xD; &lt;label id=&quot;labelentitlementDetails&quot; class=&quot;ent-contTitle&quot;&gt;List of Products&lt;/label&gt;&#xD; &lt;/div&gt;&#xD; &lt;/div&gt;&#xD; &#xD; &lt;div class=&quot;ent-contTable1&quot; style=&quot;padding-top:5px;&quot; &gt; &#xD; &lt;table width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; class=&quot;ent-homeTable1 noHover1 &quot;&gt;&#xD; &lt;thead&gt;&#xD; &lt;tr style=&quot;background-color:#F5F5F5&quot;&gt; &#xD; &lt;th width=&quot;5%&quot; align=&quot;center&quot;&gt;&lt;b&gt;S.No.&lt;/b&gt;&lt;/th&gt;&#xD; &lt;th width=&quot;45%&quot; align=&quot;center&quot;&gt;&lt;b&gt;Product&lt;/b&gt;&lt;/th&gt;&#xD; &lt;th width=&quot;25%&quot; align=&quot;center&quot;&gt;&lt;b&gt;Status&lt;/b&gt;&lt;/th&gt;&#xD; &lt;th width=&quot;25%&quot; align=&quot;center&quot;&gt;&lt;b&gt;Type&lt;/b&gt;&lt;/th&gt;&#xD; &lt;/tr&gt;&#xD; &#xD; &#xD; &lt;tr&gt;&#xD; &lt;td align=&quot;center&quot;&gt;1&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;Disney 3.5&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;Enabled&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;UnNamed&lt;/td&gt; &#xD; &lt;/tr&gt; &#xD; &#xD; &lt;tr&gt;&#xD; &lt;td align=&quot;center&quot;&gt;2&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;Disney 3.5.1&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;Enabled&lt;/td&gt;&#xD; &lt;td align=&quot;center&quot;&gt;UnNamed&lt;/td&gt; &#xD; &lt;/tr&gt; &#xD; &#xD; &#xD; &lt;/thead&gt; &#xD; &lt;/table&gt;&#xD; &lt;/div&gt;</entCert></emsResponse>

Notes

For on-premise entitlements, the Web services response includes an additional tag <featureCachingMode>. The value of this tag can be one of the following:

See Also:

Output Format for Failure

Using the Sample Response to Retrieve Certificate

Here are the steps to use the above response of the getEntitlementCertificateHTML Web service for viewing the HTML certificate:

Error Codes

Error Code Description
100 Invalid request parameter.
101 You are not authorized to use this service.
107 An internal error occurred! Please report the error to System administrator.
118 {field} should be of data type integer. [Note: This error code is applicable for the fields - featureId, License modelId, entId, ftrId, customerId, lmId, templateType, lineItemId, CustomerId, stationCount, status, and granularity.]
120 {field} value is less than the minimum permitted value {value}. [Note: This error code is applicable for the fields - productd, featureId,entId, billType, lmId, lastModified, timeZoneId, customerId, and granularity.]
122 {field} is a required field and should have a not null value. [Note: This error code is applicable for the fields - Eid, namespaceName, featureName, startDate, endDate, userIds, featureId, productName, productVersion, detailsLM, lmId, templateType, customAttribute, lineItemId, customerRefId, granularity, loginId, oldPassword, and newPassword.]
128 You should log on first.
132 The URL address does not exist.
621 Entitlement does not exist. Retry with a correct ID.
701 Invalid operation: cannot obtain Entitlement Certificate for an entitlement(id- 317 ) which is Not complete.
1081 Invalid Web service version provided
1084 No Web service version provided
1088 The EMS system is running on HTTPS. Please provide the correct Web service URL.