This document is to introduce the new RESTful License Bridge to License Manager  for SAP Business One 9.0, version for SAP HANA. It is only applied for B1H 9.0, while the COM License Bridge remain as is in SAP Business One 9.0. Here you can have more details about the license bridge: 

COM License Bridge To Cobra License Manager 8.8 and 9.0

1866772 – License Service CORBA interface has been changed to RESTful interface on ‘SAP Business One 9.0, version for SAP HANA

Sample Project Download:

Sample Code of new RESTful License Bridge to License Manager for B1H 9.0
The sample project is available as attachment for downloaded at the end of this document.
It is constituted of:

-SAPBusinessOneLicense project: The RESTful License Bridge, output as “SAPBusinessOneLicense.dll

-CSharp_Sample: A C# sample project of using the RESTful License Bridge

-VBNet_Sample:  A VB.Net sample project of using the RESTful License Bridge

How to use the RESTful License Bridge in your project

  1. Rebuild the SAPBusinessOneLicense project in the sample project to obtain the SAPBusinessOneLicense.dll
  2. Import SAPBusinessOneLicense.dll for your own project where you want to use the RESTful license bridge of SAP Business One 9.0, version for SAP HANA.
  3. Recompile the SAPBusinessOneLicenseSample solution (Visual Studio C#.Net 2010 are required to run this sample)

How to use the interfaces

Prerequisites:

  1. SAP Business One 9.0, version for SAP HANA or above.
  2. Visual Studio 2010 or above
  3. Microsoft DoNet Framework 4.0 or above

It is not recommended to the RESTful license bridge in a multi-thread circumstance, for he SAPBusinessOneLicense.dll is not built as a thread-safe library.

Here list all the interfaces of the RESTful license bridge for SAP Business One 9.0 version for SAP HANA. Please refer to SDK Online Help Center for more details.

Class or Interfaces

Description and Sample code

LicenseHelper class

This is first step to use the new RESTful COM Bridge to License Manager: Connecting to license server, the protocol must be https, and the port is 40000.

LicenseHelper license = new LicenseHelper(https://<License_Server_Address>:40000/license/”);

GetHardwareKey()

Get the hardware key of the license server

var result = license.GetHardwareKey();

GetLicenseInfoParam class

Get the License Information

GetLicenseInfoParam param = new GetLicenseInfoParam();

  1. param.wstrInstallNo = “<InstallationNo>”;
  2. param.wstrModule = “SAP-ADDONS_HDB”;;//Modules

var rm = license.GetLicenseInfo(param);

GetLicenseInfo(param)

GetSystemNumberParam

Get System Number:

GetSystemNumberParam param1 = new GetSystemNumberParam();

param1.sInstallNo = “SAP-INTERN”;

var rm1 = license.GetSystemNumber(param1);

GetSystemNumber(param)

GetLicenseNumParam

Get License Number:

GetLicenseNumParam param2 = new GetLicenseNumParam();

param2.wstrKey = “SAP-ADDONS_HDB”;

param2.wstrInstallNo = “SAP-INTERN”;

var rm2 = license.GetLicenseNum(param2);

GetLicenseNum

IsUserLicensedParam class

Check if user is licensed

IsUserLicensedParam userParam = new IsUserLicensedParam();

  1. userParam.wstrInstallNo = “<InstallationNo>”; //Installation No
  2. userParam.wstrModule = “SAP-ADDONS_HDB”;
  3. userParam.wstrUser = “manager”; //B1 User

var isUserLid = license.IsUserLicensed(userParam);

IsUserLicensed(param)

LoadLicenseFileParam

LoadLicenseFileParam param3 = new LoadLicenseFileParam();

//Put your license string here:

param3.NewLicenseFile = “—– Begin SAP License —–
SAPSYSTEM=B01”
;

var rm3 = license.LoadLicenseFile(param3);

LoadLicenseFile(param)

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !