moveLMLicenseBetweenPools

Move licenses from one customer/pool to another.

The licenses to be moved have to be not in use; if there are not enough free licenses to move, an error will be returned.

Parameters:

Field
Type
Required Description
sessionid String yes The sessionid returned by loginLMLicensee()
licensee String yes The company code (not the company name) for the Licensee.
moveInfo MoveLienseRequest yes The number of licenses to move into the new pool from another pool.

MoveLicenseRequest

Field
Type
Description
comment String Explanation for the license move. Required.
customerFrom String The company code (not the company name) of the customer from which to take the licenses.
customerTo String The company code (not the company name) of the customer to moe the licenses to.
expireDate Long The expiration date of the licenses to pull from customerFrom. The date is given as the number of milliseconds since January 1, 1970 (a standard Java time value). If this is 0 or null, then highest expiration date under customerFrom will be used, then the next highest, and so on.
numLicenses Integer The number of licenses to move.
poolFrom String The name of the pool from which to take the licenses. If the pool does not have a name, then passing "Pool ##" where ## is the pool number will also work.
poolTo String The name of the pool to move the licenses to. If the pool does not have a name, then passing "Pool ##" where ## is the pool number will also work.

Return values: A StringData structure:

Field
Type
Description
fault FaultData If an error has occurred on the server, this will contain information about the error. This field will be null if no error occurred.
data String A message indicating how many licenses were moved.

Example:

NitroAdminAccessServiceLocator service = new NitroAdminAccessServiceLocator();
NitroAdminAccess server = service.getNitroAdminAccess();

MoveLicenseRequest mlr = new MoveLicenseRequest();

mlr.setNumLicenses(2);
mlr.setComment("Unit testing");
mlr.setCustomerFrom("testcust");
mlr.setPoolFrom("Main");
mlr.setCustomerTo("cust1");
mlr.setPoolTo("Pool 18");

StringData ret = server.moveLMLicenseBetweenPools(sessionid, "cat", mlr);
if (ret.getFault()!=null) {
	System.err.println("Error: " + ret.getFault().getFaultString());
	return;
}
System.out.println("Message from move: " + ret.getData());
Comments