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

Update Line Item Feature License Model Association

Description

Updates the license model of a feature inside a line item. For an entitlement in reconfigured stage, the license model of an already deployed feature will not be updated.

The input of this Web service is the output of the retrieveLineItemFeatureLMAssociation.xml Web service. The input XML is edited to change the selected license model for a feature. In the input XML, you can update the <Selected> tag of features and set its value to one of the following:

  1. 1 =License model is selected.
  2. 0= License model is not selected (although the given feature contains this license model)
Default Protocol Method Type URI
HTTPS POST updateLineItemFeatureLMAssociation.xml

Post Parameters

Parameter Description Valid Values Optional
featureLMDetails Updated XML string of retrieveLineItemFeatureLMAssociation.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 updateLineItemFeatureLMAssociation.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/updateLineItemFeatureLMAssociation.xml");
		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
		nvps.add(new BasicNameValuePair("featureLMDetails", ""));
		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>
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.
1070 Selected License Model for feature - <featurename>, is not supported for On-Premise deployment
1074 Only Per Login counting type is allowed in concurrent license model for On-Premise(Entitlement level) entitlement.
1081 Invalid Web service version provided
1084 No Web service version provided
1093 nvalid value {0} for selected. Valid values are 0 and 1.
1096 Only one license model can be set for a feature.
1097 License Model of an already deployed feature {Name} cannot be changed.
1098 Unable to find feature with Id{ID}
1099 Unable to find License Model with Id {ID}.
1113 Only Per Identity Per Station counting type is allowed in concurrent license model for On-Premise Feature level entitlement.