[Progress Communities] [Progress OpenEdge ABL] Forum Post: Consume a REST service on amazonaws.com - SSL Connection failure

Status
Not open for further replies.
M

Mark Davies

Guest
Hi, I am attempting to consume a REST web service on OE11.6 - Windows 10 (production to be Linux RedHat), hosted on amazonaws.com, but it fails to connect due to the following error: Secure Socket Layer (SSL) failure. error code 29712: SSL routines (9318) followed by: Connection failure for host ********.execute-api.eu-west-1.amazonaws.com port 443 transport TCP. (9407) I tried to find a solution by following some KB solutions without luck. The problem seems to be protocol and cipher difference - from what I understand. The following is a very dumbed-down version of my program: USING OpenEdge.Net.HTTP.*. USING OpenEdge.Net.URI. USING OpenEdge.Net.HTTP.Lib.ClientLibraryBuilder FROM PROPATH. USING Progress.Json.ObjectModel.JsonObject. DEFINE VARIABLE oClient AS IHTTPClient NO-UNDO. DEFINE VARIABLE oURI AS URI NO-UNDO. DEFINE VARIABLE oRequest AS IHttpRequest NO-UNDO. DEFINE VARIABLE oResponse AS IHttpResponse NO-UNDO. DEFINE VARIABLE vlcRequestData AS LONGCHAR NO-UNDO. DEFINE VARIABLE oLib AS IHttpClientLibrary NO-UNDO. DEFINE VARIABLE oJsonParam AS JsonObject NO-UNDO. oLib = ClientLibraryBuilder:Build() :AddSslProtocol('TLSv1') /* suggest by KB */ :AddSslCipher('AES128-SHA') /* suggest by KB */ :Library. oClient = ClientBuilder:Build():Client. oURI = NEW URI('https', '*****.execute-api.eu-west-1.amazonaws.com',443). /* URL changed for security */ oURI:path = 'uat?AuthKey=########&Limit=5'. oRequest = RequestBuilder:Build('GET', oURI) :ContentType('application/json') :acceptJson() :REQUEST. oResponse = ResponseBuilder:Build():Response. oClient:execute(oRequest, oResponse). oResponse = ClientBuilder:Build():Client:Execute(oRequest). MESSAGE STRING(oResponse:StatusCode) SKIP STRING(oResponse:StatusReason, "x(30)") VIEW-AS ALERT-BOX. IF oResponse:StatusCode <> 200 THEN DISPLAY "Request Error" + String(oResponse:StatusCode). ELSE CAST(oResponse:entity, JsonObject):WriteFile('c:\temp\resp.json', TRUE). I then did a simple C# program to do the same and that connected first time round. What do I need to do in OE to make this work? Thanks in advance

Continue reading...
 
Status
Not open for further replies.
Top