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

Update Line Item Feature Association

Description

Updates the inclusion and exclusion of features associated with the given line item. The input of this Web service is the output of retrieveFeatureLineItemAssociation.xml. The input XML is edited to include or exclude the features.

In the input XML, you can update the <On> tag of features. The valid values are:

  1. 1 =Feature is included
  2. 0= Feature is excluded
  1. If you try to include/exclude a feature that is already included/excluded, you will not get any error.
  2. In the case of an on-premise entitlement, when you include a feature that does not have an on-premise supported license model, the default license model is automatically changed to the supported one. You receive the response code 9001 as a notification of this change.
Default Protocol Method Type URI
HTTPS POST updateFeatureLineItemAssociation.xml

POST Parameters

Parameter Description Valid Resources/TableStyles/BlackTable.css Optional
featureDetails Features you want to include or exclude. It is the updated XML string of the Web service retrieveFeatureLineItemAssociation.xml. String No

Sample Code

import java.io.IOException;
//..............................
//..............................
//..............................
import org.apache.http.params.HttpParams;
public class EMSSample {
	private static DefaultHttpClient httpclient = new DefaultHttpClient();
	private static Principal principal = null;
	//..............................
	//..............................
	//..............................
	public static String updateFeatureLineItemAssociation.xml()throws Exception {
		if(!verifyLogin()){
			return "login failed";
		}
		HttpContext context = new BasicHttpContext();
		context.setAttribute(ClientContext.USER_TOKEN, principal);
		HttpPost post =  new HttpPost("https://localhost:8443/ems/3.6/updateFeatureLineItemAssociation.xml");
		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
		nvps.add(new BasicNameValuePair("featureDetails", ""));
		post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
		HttpResponse response = httpclient.execute(post, 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);
	}
}
       

Sample Response

<emsResponse>
  <stat>ok</stat>
</emsResponse>

The following is the example of response code 9001:

<emsResponse>
  <code>9001</code>
  <desc>Default license model selected modified for following
  features : [2, 3] for On-Premise deployment.</desc>
  <stat>ok</stat>
</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.
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.
618 Could not find the entitlement line item.
647 Cannot update entitlement with lifeCycleState=complete.
1043 XML schema Validation Failed.
1077 FeatureID out of range for feature <featurename>. FeatureID can range from 1-65471 for On-premise deployment.
1081 Invalid Web service version provided
1084 No Web service version provided
1090 The product does not have feature {feature Id}.
1091 Invalid value {value given} for On.Valid values are 0(off) and 1(on).
1092 Allow at least one feature.
1101 No License Model exist for the featureID {0}, which is supported for on-premise.