Click or drag to resize

IWsLicenseSetRemoveLicense Method

Remove a purchased license that was active state. Using the method SetRemoveLicense() by Aruba WsEndUser, you can remove a license, if associated with the account with which you all the method. In case you want to remove the license is associated with a different account, an error message is returned and the operation will fail. The operation of removing the license can not be completed if there is a transaction relating to the license, appended with error or status other than Completed.

Namespace:  Aruba.Cloud.WsLicense
Assembly:  Aruba.Cloud.WsLicense (in Aruba.Cloud.WsLicense.dll) Version: (
WsResult SetRemoveLicense(
	int licenseId


Type: SystemInt32

Return Value

Type: WsResult
The method returns an object WsResult contains information about the method call. For further details on the information returned by the method refer to the definition of the class WsResult.
The following example shows a custom method, called SetRemoveLicense(), which performs a call to SetRemoveLicense() WsEndUser of Aruba, to remove the license code 21
private void RemoveLicense()
    // makes the call to the method SetRemoveLicense, obtaining an object WsResult

    WsResult result = client.SetRemoveLicense(21);

    // if the call fails, it raises the error message
    if (!result.Success)
      throw new ApplicationException(
        String.Format("An error has occurred while invoking SetRemoveLicense(). {0}", result.ResultMessage));
  catch (Exception ex)
    // raises the generic error
    throw new ApplicationException(
      String.Format("An error has occurred while remove license {0}", ex.Message));
See Also