How to handle a HttpResponse with a REST call using HTTPS

Posted by Benjamin Zehnpfennig on 22-Apr-2016 10:30

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).

All Replies

Posted by Peter Judge on 22-Apr-2016 10:44

There's a bug (PSC00339091: HTTP request over SSL sometimes loses payload ) that you may be running into. Contact tech support about getting a hotfix for it.
 
 
 

Posted by thunderfoot79 on 12-Aug-2016 15:08

This bug appears to finally be fixed as of 11.6.2

This thread is closed