You are here: Catalog Elements > Feature > featureList

Retrieve Feature By Criteria

Description

Retrieves feature list and related feature details by the specified criteria.

In the response of this Web service, the value of tag 'id' under the 'feature' tag denotes ftrId. The retrieved ftrId can be used further in web service calls for performing feature management operations. The ftrId is an auto-generated, unique record ID of a feature as stored in EMS database. It is returned by the addFeature.xml web service on successful creation of a feature.

The response also contains enfId that denotes the feature ID that is used by protected applications for enforcement.

Default Protocol Method Type URI
HTTPS GET featureList.xml

Query Parameters

Parameter Description Valid Values Optional
namespace Name of the namespace to which the feature belongs. String Yes
featureId

Feature ID.

Please note that ftrId and featureId are different.

  • ftrId: It is an auto-generated, unique record ID of a feature in EMS database.
  • featureId: It is the unique identification code provided by software provider for a feature. It is used in license enforcement.

Integer

(>0)

Yes
featureName

The unique feature name.

String Yes
refId1 Information that uniquely identifies the feature in a different ERP system. String Yes
refId2 A second unique reference ID, similar to Ref ID 1. String Yes
Lastmodified Creation or modification timestamp of the namespace. Long Yes
showAssociatedProducts

Indicates whether to retrieve the list of products associated with the given feature or not.

Valid values are True or False.

Default Value: False

Boolean Yes

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 featureList.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/featureList.xml");
		query = new StringBuffer();
		setParameter("featureName", "");
		setParameter("refId2", "");
		setParameter("lastModified", "");
		setParameter("refId1", "");
		setParameter("featureId", "");
		setParameter("showAssociatedProducts", "");
		setParameter("namespace", "");
		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>
   <features>
      <feature>
         <creationTime>1333339584000</creationTime>
         <deployed>true</deployed>
         <desc />
         <enabled>true</enabled>
         <enfId>1</enfId>
         <id>1</id>
         <licenseModels>
            <licenseModel>
               <default>0</default>
               <enfName>Sentinel Cloud</enfName>
               <enfVersion>3.6.0</enfVersion>
               <id>2</id>
               <name>Postpaid</name>
            </licenseModel>
            <licenseModel>
               <default>0</default>
               <enfName>Sentinel Cloud</enfName>
               <enfVersion>3.6.0</enfVersion>
               <id>3</id>
               <name>Concurrent</name>
            </licenseModel>
            <licenseModel>
               <default>1</default>
               <enfName>Sentinel Cloud</enfName>
               <enfVersion>3.6.0</enfVersion>
               <id>4</id>
               <name>PrePaid</name>
            </licenseModel>
            <licenseModel>
               <default>0</default>
               <enfName>Sentinel Cloud</enfName>
               <enfVersion>3.6.0</enfVersion>
               <id>1</id>
               <name>Subscription</name>
            </licenseModel>
         </licenseModels>
         <modificationTime>1333339584000</modificationTime>
         <name>F1</name>
         <namespaceId>1</namespaceId>
         <namespaceName>Test</namespaceName>
         <products>
            <product>
               <id>4</id>
               <name>Mix2</name>
               <ver>3.6</ver>
            </product>
            <product>
               <id>1</id>
               <name>P1</name>
               <ver>3.6</ver>
            </product>
         </products>
         <refId1 />
         <refId2 />
      </feature>
   </features>
   <stat>ok</stat>
</emsResponse>

In the response above:, the value of tag 'id' under the 'feature' tag denotes ftrId. The retrieved ftrId can be used further in web service calls for performing feature management operations. The response also contains enfId that denotes the feature ID that is used by protected applications for enforcement.

 

See Also:

Output Format for Failure

Error Codes

Error Code Description
100 Invalid request parameter.
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.]
120 {field} value is less than the minimum permitted value {value}. [Note: This error code is applicable for the fields - productd, featureId,entId, billType, lmId, lastModified, timeZoneId, customerId, and granularity.]
128 You should log on first.
133 Invalid namespace.
1080 {field} should be of dataType long. [Note: This error code is applicable for the field - lastModified.]
1081 Invalid Web service version provided
1084 No Web service version provided
1088 The EMS system is running on HTTPS. Please provide the correct Web service URL.