You are here: Machine Registration > retrieveFingerprint

Retrieve Fingerprint

This Web service retrieves a list of fingerprints for the specified customers.

This Web service is available only for on-premise feature level licensing.

Description

Retrieve fingerprint(s) for the customer(s).

Default Protocol Method Type URI
HTTPS GET retrieveFingerprint.xml

Query Parameters

Parameter Description Valid Values Optional
customerInfo Customer reference IDs String No

Input XML

<CustomerDetails>
  <CustomerList>
    <Customer>
      <CustomerRefId>CNew</CustomerRefId>
    </Customer>
  </CustomerList>
</CustomerDetails>
         

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 retrieveFingerprint.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/retrieveFingerprint.xml");
		query = new StringBuffer();
		setParameter("customerInfo", "");
		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>
    <CustomerList>
      <Customer>
        <CustomerRefId>C1</CustomerRefId>
        <FingerprintList>
          <Fingerprint>
            <FingerprintId>37</FingerprintId>
            <FingerprintFriendlyName>fingerprint1</FingerprintFriendlyName>
            <CustomFingerprint>Noi1-51010</CustomFingerprint>
            <FingerprintValue>&lt;hasp_info&gt;&lt;host_fingerprint type="SL-AdminMode" crc="2422381874"&gt;MXhJSSPcqVWSIA2aASDcJsWoxTeuotGzdNWq4Yn7IyxKaQk+UKpYHRGDoHl8IaKnBA1x5qguykuQKjaSQr8IeTEsVUYY0SLCWDBxhQNIRQ==&lt;/host_fingerprint&gt; &lt;host_fingerprint type="SL-UserMode" crc="3700693339"&gt;MnhJSQOBgkBO1HECAnOg4vHJFC8mId27UF1oxThE4bgITIx6RqaUlaZN4eTCGLAiBhJYSSlGAI6pAjOrPHcIqHBsClCRac4pBFQcWpYszxZDAPTin6gzJWKBdgSL&lt;/host_fingerprint&gt;&lt;/hasp_info&gt;</FingerprintValue>
          </Fingerprint>
        </FingerprintList>
      </Customer>
    </CustomerList>
  </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.
1105 Customer does not exist. Provide a valid Customer Reference Id.
1114 Invalid XML string provided. Provide a valid XML.
1115 CustomerRefId cannot be blank. Provide a valid XML.
1129 Error occurred while decoding the fingerprint value. Please contact the system administrator for further assistance.