You are here: Machine Registration > retrieveEntitlementFingerprint

Retrieve Entitlement Fingerprint

Description

This Web service retrieves a list of machine fingerprints associated with given entitlements.

Notes

Default Protocol Method Type URI
HTTPS GET retrieveEntitlementFingerprint.xml

Query Parameters

Parameter Description Valid Values Optional
contractInfo Input XML containing list of EIDs. String No

Input XML

<EntitlementDetails>
  <EntitlementList>
    <Entitlement>
      <Eid>fe9a7eec-3442-4337-9abc-6171efdaa883</Eid>
    </Entitlement>
  </EntitlementList>
</EntitlementDetails>

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 retrieveEntitlementFingerprint.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/retrieveEntitlementFingerprint.xml");
		query = new StringBuffer();
		setParameter("contractInfo", "");
		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

<emsResponse>
  <stat>ok</stat>
  <FingerPrintDetails>
    <EntitlementList>
      <Entitlement>
        <Eid>5881d433-68b5-4bb8-8809-1ec6a7e439d5</Eid>
        <FingerprintList>
          <Fingerprint>
            <FingerprintId>7</FingerprintId>
            <FingerprintFriendlyName>fingerprint1</FingerprintFriendlyName>
            <CustomFingerprint>Noi1-51010</CustomFingerprint>
            <FingerprintValue>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;hasp_info&gt;&lt;host_fingerprint type="SL-AdminMode" crc="956404683"&gt;MXhJSSPcKFRyIA2aASAaqk2qxTeuopU7ctmq4Yn7YyTicAk+UKqYVMn1oHl8IaLhItxx5qguyg+gcTaSQr8IWfXqTkYY0SJi1SlmhQNIRQ==&lt;/host_fingerprint&gt;&lt;host_fingerprint type="SL-UserMode" crc="4283274314"&gt;MnhJSSPAoA8njiPnmANwGkhEsynM9a7iFBgieMIWEpj7Zyz0IGuiHU6qgIT5YwcsgRQjihEMVqRShCAgqo8QS5bNG4eAiFrUbgsXqw30ImYRkTYPgEpYRA==&lt;/host_fingerprint&gt;&lt;/hasp_info&gt;</FingerprintValue>
            <isActive>false</isActive>
          </Fingerprint>
        </FingerprintList>
      </Entitlement>
    </EntitlementList>
  </FingerPrintDetails>
</emsResponse>
See Also:

Output Format for Failure

Error Codes

Error Code Description
101 You are not authorized to use this service.
128 You should log on first.
1114 Invalid XML string provided. Provide a valid XML.
1020 Invalid XML string provided. Provide a valid XML
1121 Entitlement does not exist. Provide a valid EID.
1122 Entitlement is not of type On-premise Entitlement Level.
1123 EID cannot be blank.Please provide a valid xml.
1125 contractInfo cannot be empty.Please provide a valid input.
1129 Error occurred while decoding the fingerprint value. Please contact the system administrator for further assistance.