1

This is my first time using any kind of HTTP request in OpenEdge ABL, so I am pretty confused with the error message.

I have the following code:

using OpenEdge.Net.HTTP.*.
using OpenEdge.Net.URI.
using Progress.Json.ObjectModel.*.
using OpenEdge.Net.HTTP.Credentials.

define variable oURI         as URI           no-undo.
define variable oClient      as IHttpClient   no-undo.
define variable oRequest     as IHttpRequest  no-undo.
define variable oResponse    as IHttpResponse no-undo.
define variable oJsonObject  as JsonObject    no-undo.
define variable JsonString   as longchar      no-undo.
define variable oCredentials as Credentials   no-undo.

/* Benutzername und Passwort */
define variable username     as character     no-undo initial 'user4name':U.
define variable password     as character     no-undo initial '4admin':U.

oCredentials = new Credentials('application':U,username,password). 

//Build a request
oURI = URI:Parse('https://dms.com/api/v1/projects/packages':U).                                                              
oRequest = RequestBuilder:Get(oURI):UsingBasicAuthentication(oCredentials):Request.

//Execute a request    
oClient = ClientBuilder:Build():Client.
oResponse = oClient:Execute(oRequest).
    
//Process the response
if oResponse:StatusCode <> 200 then
    return error "Request Error: " + STRING(oResponse:StatusCode).
else
do:

    oJsonObject = cast(oResponse:Entity, JsonObject).
    oJsonObject:Write(JsonString, true).
    message string(JsonString).

end. /* if oResponse:StatusCode <> 200 */

I've changed out the HTTP Link and username/password values because I don't want to leak internal data.

After I run the procedure (with the correct HTTP Link and username/password values), I get the following error messages: enter image description here

enter image description here

I've followed the folowing Progress documentation for this example: https://docs.progress.com/bundle/openedge-abl-develop-http-clients/page/Develop-an-HTTP-client-application-in-ABL.html

When I try to run a GET through a REST test program like Insomnia, I get the proper result that I expect in JSON format. I basically want to to the same inside of OpenEdge.

Does anyone have an idea what's wrong here?

EDIT: using a http instead of https seems to work. So the issue seems to be https related.

8
  • 1. which Progress OpenEdge version? The bundled openssl (compiled as sslc) varies and can introduce issues 2. you have blurred out the host in your error message but your code still contains the url Commented Sep 19, 2025 at 5:16
  • We are using OpenEdge 11.7.8. The URL in my code is not the proper website. I ran the code once with the proper URL (the one blured out in the error message), but the one in the code is a fictious URL. Commented Sep 19, 2025 at 6:06
  • 11.7.... maybe community.progress.com/s/article/… helps - it walks through using sslc (the Progress compiled version of openssl) Commented Sep 19, 2025 at 15:55
  • It may also be worthwhile to enable SSL debugging (community.progress.com/s/article/P121819) which may provide extra info. Commented Sep 19, 2025 at 16:15
  • 1
    @StefanDrissen+ winsock error 11001 means name lookup failed, because -host in s_client should specify only a hostname or IPaddress, not including https colon and slashes Commented Sep 24, 2025 at 21:25

3 Answers 3

2

The short answer is that, because OpenEdge does not use the OS' certificate store, you need to install the pertinent root CA certificate.

The simplest way to get and install the certificate is to download the root certificate from your browser (in .PEM format), and then use the certutil import command to get it into the OpenEdge certificate store.

This knowledge base also has details on the process: https://community.progress.com/s/article/P186048

Sign up to request clarification or add additional context in comments.

3 Comments

Sadly that doesn't fix the issue because I already have the CA certificates imported via certutil. When I do certutil -list the necessary certificates show up in the list. Also the knowledge base link is a different error number than mine. In link it's -54, while mine is 0.
It could be that you think you have the certificate but don't. Cloud-hosted sites (ie in Amazon) can sometime have a different actual host to your/the DNS host and that causes things to go splat since you don't have that host's root CA installed. I use ssllabs.com to get the actual certs for a host.
I used sslabs.com, but am a bit confused as to which certificate I need to obtain. The one where it says Server Key and Certificate #1 is the one I should get? What about the ` Additional Certificates (if supplied)` category? Should I obtain those as well?
0

You can try changing the SecurityProtocol you're using - See if this helps you...

I was having a similar issue in the past, only from a single server it wasn't connecting - By adding these protocols, now works normally.

ServicePointManager:SecurityProtocol = ServicePointManager:SecurityProtocol 
                                    OR SecurityProtocolType:Tls12.          
                                  //OR SecurityProtocolType:Tls13.

// Example from my code:

ASSIGN HttpClient = NEW System.Net.Http.HttpClient().   
        
        HttpClient:DefaultRequestHeaders:TryAddWithoutValidation("Authorization", cAuth).
        HttpClient:DefaultRequestHeaders:Accept:ADD(NEW System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")).

        ServicePointManager:SecurityProtocol = ServicePointManager:SecurityProtocol 
                                            OR SecurityProtocolType:Tls12.          
                                            //OR SecurityProtocolType:Tls13.
        
        ASSIGN HttpClient:BaseAddress = NEW System.Uri(cURL)
               oContent               = NEW StringContent(cContent, System.Text.UTF8Encoding:UTF8, "application/json").
        

Comments

0

First of all, thank you everyone who decided to give hints and tips. I really appreciate it.

After numerous hours of trying different things out and researching, I've found the solution.

I've had to modify my code to look like this in order for the error message to disappear:


using OpenEdge.Net.HTTP.RequestBuilder. 
using OpenEdge.Net.HTTP.IHttpRequest.
using OpenEdge.Net.HTTP.IHttpClient.
using OpenEdge.Net.HTTP.ClientBuilder.
using OpenEdge.Net.HTTP.Lib.ClientLibraryBuilder.
using OpenEdge.Net.HTTP.IHttpClientLibrary.
using OpenEdge.Net.HTTP.IHttpResponse.
using OpenEdge.Net.HTTP.Credentials.
using OpenEdge.Net.URI.
using Progress.Json.ObjectModel.*.

define variable oURI                  as URI                  no-undo.
define variable oClient               as IHttpClient          no-undo.
define variable oRequest              as IHttpRequest         no-undo.
define variable oResponse             as IHttpResponse        no-undo.
define variable oJsonObject           as JsonObject           no-undo.
define variable JsonString            as longchar             no-undo.
define variable oCredentials          as Credentials          no-undo.
define variable oReqBuilder           as RequestBuilder       no-undo.
define variable oClientLibraryBuilder as ClientLibraryBuilder no-undo.
define variable oClientBuilder        as ClientBuilder        no-undo.
define variable lcResponse            as longchar             no-undo.

/* Benutzername und Passwort */
define variable username              as character            no-undo initial 'user4name':U.
define variable password              as character            no-undo initial '4admin':U.

/* Set credentials */
oCredentials = new Credentials().
oCredentials:UserName = username.
oCredentials:Password = password.

/* Build a request */
oURI = URI:Parse('https://dms.com/api/v1/projects/packages':U).                                                              
oReqBuilder = RequestBuilder:Get(oURI).
oReqBuilder:UsingBasicAuthentication(oCredentials).
oRequest = oReqBuilder:request.

oClientLibraryBuilder = ClientLibraryBuilder:Build().
oClientLibraryBuilder:ServerNameIndicator('dms.com':U).

oClientBuilder = ClientBuilder:Build().
oClientBuilder:UsingLibrary(oClientLibraryBuilder:Library).

/* Execute a request */    
oClient = oClientBuilder:Client.

oResponse = oClient:Execute(oRequest).
    
/* Process the response */
if oResponse:StatusCode <> 200 then
    return error "Request Error: " + STRING(oResponse:StatusCode).
else
do:

    oJsonObject = cast(oResponse:Entity, JsonObject).
    fix-codepage(lcResponse) = 'UTF-8':U.
    oJsonObject:Write(lcResponse, true).
    message string(lcResponse).

end. /* if oResponse:StatusCode <> 200 */

I've had all certificates already imported, but the problem was that I was missing the ServerNameIndicator Method:

oClientLibraryBuilder:ServerNameIndicator('dms.com':U).

In order to use the method, I had to modify my code to the above version.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.