REST API on Unix (Solaris)

Louise

New Member
Hi,

We are upgrading to version 11.7.2 on a Solaris box.

We really need to be able to chat to REST API's.

I thought/assumed it should be possible from the new verison from progress but have read this sentence in one of teh Progress Knowledge base entries:

"Customers on OpenEdge versions between 10.2x and 11.5 could use the .NET HttpClient. However, unlike the ABL HTTP Client, this code can only be used on Windows platforms."

Is this really true?

If so, any suggestions of how to get it done?

Thanks in advance,
Louise
 

RealHeavyDude

Well-Known Member
AFAIK, you only need to use the .NET HTTTPClient when the web service you are calling requires the client to present the SSL client certificate. If that is not the case then you should be fine with the HTTP client incorporated into the ABL.
 

Louise

New Member
AFAIK, you only need to use the .NET HTTTPClient when the web service you are calling requires the client to present the SSL client certificate. If that is not the case then you should be fine with the HTTP client incorporated into the ABL.

Thank you so much for your response :)

So do you mean by HTTP client, this type of code to connect?:

DEFINE VARIABLE hWebService AS HANDLE NO-UNDO.
CREATE SERVER hWebService.

hWebService:CONNECT("-WSDL 'http://www.webservice.com.au/test’”).

The type of data that will be returned is in JSON format so from what I understand using the NET HTTPClient allows the data to be read into temp-tables, can be same be done with HTTP Client.

Or do you mean this type of code (code snippet from Progress Knowledgebase):

USING OpenEdge.Net.HTTP.IHttpRequest.
USING OpenEdge.Net.HTTP.IHttpResponse.
USING OpenEdge.Net.HTTP.ClientBuilder.
USING OpenEdge.Net.HTTP.IHttpClientLibrary.
USING OpenEdge.Net.HTTP.lib.ClientLibraryBuilder.
USING OpenEdge.Net.HTTP.RequestBuilder.

DEFINE VARIABLE oLib AS OpenEdge.Net.HTTP.IHttpClientLibrary NO-UNDO.
DEFINE VARIABLE oHttpClient AS OpenEdge.Net.HTTP.IHttpClient NO-UNDO.
DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO.
DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO.

ASSIGN
oLib = ClientLibraryBuilder:Build():sslVerifyHost(NO):library
oHttpClient = ClientBuilder:Build():UsingLibrary(oLib):Client
oRequest = RequestBuilder:Get('https://opendata.rdw.nl/resource/m9...MKOK8mau1UTIupRTefw&kenteken=3ZRG97'):Request
oResponse = oHttpClient:Execute(oRequest).
 

RealHeavyDude

Well-Known Member
The first is the built-in WebService client for - as far as I know - SOAP based WebServices only.
The latter is the one you need for REST based WebServices.

But, I have to admit that I haven't used the first one in years and the latter one not all since the environment I am working requires the SSL client certificate to be presented to the service. Therefore on Unix we use wget as HTTP client as it is part of our "engineered" Solaris distribution. I know it is ugly, but I did not have the time yet to implement something else.
 
Top