Skip to Content
0
Jun 25, 2018 at 02:17 PM

Error with RESTful License Bridge

113 Views

Hi experts

We are using the new RestFul License Bridge in a cloud server with SAP 9.2 PL 10. We are trying to read the license info for our AddOn through SAPBusinessOneLicense.LicenseHelper object in SAP HANA

The sample code for the test is:

    Sub Main()
        Dim license As SAPBusinessOneLicense.LicenseHelper
        Dim oParam As GetLicenseInfoParam
        Dim sServidorLicencia As String = String.Empty
        Console.WriteLine("Write license server")
        sServidorLicencia = Console.ReadLine()


        license = New SAPBusinessOneLicense.LicenseHelper(String.Format("https://{0}:40000/license/", sServidorLicencia))


        'get hardware key
        Dim oHk = license.GetHardwareKey()
        oParam = New GetLicenseInfoParam()
        Console.WriteLine("Write installation number")
        oParam.wstrInstallNo = Console.ReadLine()
        Console.WriteLine("Write license key")
        oParam.wstrModule = Console.ReadLine()
        Dim oDatosLicencia = license.GetLicenseInfo(oParam)
        Console.WriteLine("Hardwarekey:{0}", oHk.pHK)
        Console.WriteLine("License number:{0}", oDatosLicencia.lNum.ToString())
        Console.WriteLine("Available license:{0}", oDatosLicencia.lAvailable.ToString())
        Console.WriteLine("Date start:{0}", oDatosLicencia.lStart.ToString())
        Console.WriteLine("Date finish:{0}", oDatosLicencia.lEnd.ToString())
        Console.ReadLine()
    End Sub

That code always give me 0 avaible licenses for my AddOn, but in SAP I see the license generated Is it something wrong in my code? I refered to blog https://blogs.sap.com/2014/03/06/new-restful-license-bridge-to-license-manager-for-sap-business-one-90-version-for-sap-hana/ to do it

Regards

Alvaro