I am having trouble handling a HttpResponse while doing an REST call with HTTPS. I keep getting the error:
Invalid handle. Not initialized or points to a deleted object. (3135)
I have tried the same REST call with HTTP and everything works fine just not with HTTPS.
The request does get to our server and it does write a record to our database but Progress doesn't seem to be able to handle the response correctly for a secure call.
Any help with this would be much appreciated.
DEF VAR httJsonExample AS HANDLE NO-UNDO. DEF VAR lRetOK AS LOGICAL NO-UNDO. def var httpUrl as char no-undo. DEFINE VAR oJson AS JsonObject NO-UNDO. DEFINE VAR oRequest AS IHttpRequest NO-UNDO. DEFINE VAR oResponse AS IHttpResponse NO-UNDO. DEF VAR oCredentials AS Credentials NO-UNDO. assign httpUrl = "https://randomsite.com/stuff". httJsonExample = DATASET randomDataset:HANDLE NO-ERROR. oJson = new JsonObject(). ASSIGN lRetOK = oJson:Read(httJsonExample,true,true) NO-ERROR. CAST(oJson, JsonObject):WriteFile('randomFile.json.' + STRING(DAY(TODAY)), true). oCredentials = new Credentials('application','USERNAME','PASSWORD'). oRequest = RequestBuilder:POST(httpUrl, oJson) :AddHeader("Location", "Somewhere") :AcceptJson() :UsingBasicAuthentication(oCredentials) :Request. /* this is where it fails. oResponse = ClientBuilder:Build():Client:Execute(oRequest).
This bug appears to finally be fixed as of 11.6.2