You are here: Entitlement Management > Entitlement Line Item > retrieveFeatureLineItemAssociation

Retrieve Entitlement Line Item Feature Association

Description

Retrieves a list of features that are associated with a line item and are either included or excluded. For user information, the line item product name, ID, and version are also returned.

The values of the <On> tag in the XML response indicate the following:

  1. 1 =Feature is included in the line item
  2. 0= Feature is excluded from the line item
Default Protocol Method Type URI
HTTPS GET retrieveFeatureLineItemAssociation.xml

GET Parameters

Parameter Description Valid Values Optional
lineItemId Line item ID Integer 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 retrieveFeatureLineItemAssociation.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/retrieveFeatureLineItemAssociation.xml");
		query = new StringBuffer();
		setParameter("lineItemId", "1");
		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>
  <lineItem>
    <lineItemId>1</lineItemId>
    <itemProduct>
      <itemFeatureLicenseModels>
        <itemFeatureLicenseModel>
          <feature>
            <id>5</id>
            <featureName>F4</featureName>
            <On>0</On>
          </feature>
        </itemFeatureLicenseModel>
        <itemFeatureLicenseModel>
          <feature>
            <id>2</id>
            <featureName>F2</featureName>
            <On>0</On>
          </feature>
        </itemFeatureLicenseModel>
        <itemFeatureLicenseModel>
          <feature>
            <id>1</id>
            <featureName>F1</featureName>
            <On>1</On>
          </feature>
        </itemFeatureLicenseModel>
        <itemFeatureLicenseModel>
          <feature>
            <id>3</id>
            <featureName>F3</featureName>
            <On>0</On>
          </feature>
        </itemFeatureLicenseModel>
      </itemFeatureLicenseModels>
      <product>
        <productId>2</productId>
        <productName>P1</productName>
        <productVersion>2.2</productVersion>
      </product>
    </itemProduct>
  </lineItem>
</emsResponse>
See Also:

Output Format for Failure

Error Codes

Error Code Description
100 Invalid request parameter.
101 You are not authorized to use this service.
102 Invalid data entered.
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.]
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.
682 The line item does not exist.
1081 Invalid Web service version provided
1084 No Web service version provided
1116 Only "Per Identity Per Station" counting type in Concurrent license type is allowed for the Feature Level caching mode of on-premise entitlements.Please change the license model associated with this feature.