Converting OpenLM API consumption from Server v4 to v5 - OpenLM Software License Management
Israel +972 4 6308447         USA +1 619 831 0029              JAPAN +81 3 45208991 担当:萩原

Converting OpenLM API consumption from Server v4 to v5

The following document describes how to convert applications that used the old v4 OpenLM APIs and adapt them to OpenLM Server v5.

You can also check out this archive which contains a sample project.

 

Contents:

Converting XML API consumption

New link

Changing the code

Converting SOAP API consumption

New link

Changing the code

Code example

 

Converting XML API consumption

New link

http://[openlm_server]:5015/api/easyadminapi/postmessage

 

Changing the code

No code changes are needed if you previously used the XML API on port 7014. Just replace the old link (http://[openlm_server]:7014/OpenLMServer) to the new link and everything will work as usual.

 

Converting SOAP API consumption

New link

http://[openlm_server]:5015/api/easyadminapi/web/[method]

 

Changing the code

SOAP methods are no longer supported on OpenLM Server v5.x. In order to consume those methods, a web request to the new API endpoint needs to be sent. The request needs to be in JSON format. The response will be returned in JSON format as well. You can see a code example here for converting the old SOAP method GetDenialsChart.

 

Code example

public void GetLicenses()
        {
            /* Old code for OpenLM server version 4.x or older for SOAP API call
            AdminAPIClient client = new AdminAPIClient();
            var request = new LicenseInfoRequest {
                BaseInfo = new RequestBaseInfo()
            };
            LicensesResponse response = client.GetLicenses(request);*/

            //Start code for converted API SOAP call for OpenLM server version 5.x
            var request = new LicenseInfoRequest {
                BaseInfo = connector.CreateBaseInfo(connector)
            };
            LicensesResponse response = connector.Get<LicensesResponse, LicenseInfoRequest> (request, "GetLicenses");
            //End code for converted API SOAP call for OpenLM server version 5.x

            Assert.IsNotNull(response);
            Assert.IsNull(response.Error);
        }

in API

Related Articles