Hi guys, I have an issue when using HTTP client(OpenEdge.Net.pl) on Linux (CentOS 7). OpenEdge version is 11.7.3.
Every response I get is HTTP/1.0 version (even when forcing HTTP/1.1 in request), but also ContentLength is always 0 and there is no response body (Entity object)!
Using log-manager I discovered that full response, containing both header and body, comes back to the server, but in OpenEdge I get only header.
When trying same thing on Windows 10, everything works fine, I get response body.
I would appreciate your help.
Regards,
Ivan
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
Dear Peter, thank you for your answer. No, didn't get any log errors, my log-manager log file looks like this:
[OE.N.HTTP.L.ABLS.ABLSocketLibrary INFO] REQUEST: TIMEOUT(s)=0
[OE.N.HTTP.L.ABLS.ABLSocketLibrary DEBUG] REQUEST: FILE= /srv/medical/db/request-raw.txt
[OE.N.HTTP.L.ABLS.ABLSocketLibrary DEBUG] RESPONSE: FILE= /srv/medical/db/response-data-received.txt
[OE.N.SC.ClientSocket DEBUG] Connect: -H hr-nbs-ite-domname.northeurope.cloudapp.azure.com -S 80
[OE.N.SC.ClientSocket DEBUG] Connect: TIME(ms)=46
[OE.N.SC.ClientSocket DEBUG] Write: time(ms)=0
[OE.N.SC.ClientSocket DEBUG] Write: size(b)=1211
[OE.N.SC.ClientSocket DEBUG] WaitSync: timeout(s)=0
[OE.N.SC.ClientSocket DEBUG] ReadHandler: OK? yes
[OE.N.SC.ClientSocket DEBUG] ReadHandler: time(ms)=133
[OE.N.SC.ClientSocket DEBUG] ReadHandler: size(b)=488
[OE.N.HTTP.L.ABLS.ABLSocketLibrary DEBUG] CHUNK: NUM= 1
[OE.N.HTTP.L.ABLS.ABLSocketLibrary DEBUG] CHUNK: SIZE(b)= 8192
[OE.N.HTTP.L.ABLS.ABLSocketLibrary DEBUG] CHUNK: READ(b)= 488
[OE.N.HTTP.L.ABLS.ABLSocketLibrary TRACE] CHUNK: FILE= /srv/medical/db/response-data-chunk-00001.txt
[OE.N.SC.ClientSocket DEBUG] ReadHandler:OnDataReceived time(ms)=40
[OE.N.SC.ClientSocket DEBUG] ReadHandler: ReadComplete? yes
[OE.N.SC.ClientSocket DEBUG] ReadHandler: ReadTimeout? no
[OE.N.SC.ClientSocket DEBUG] ReadHandler: ReadTerminated? no
[OE.N.SC.ClientSocket DEBUG] WaitSync: total time(ms)=,178
[OE.N.SC.ClientSocket DEBUG] WaitSync: total size(b)=488
[OE.N.SC.ClientSocket DEBUG] Disconnect: -H hr-nbs-ite-domname.northeurope.cloudapp.azure.com -S 80
My response-data-received.txt file looks like this (on Windows I get HTTP/1.1 and Transfer-Encoding: chunked, which I can not force on Linux..):
HTTP/1.0 200 OK
Cache-Control: private, max-age=0, no-cache, no-store, no-transform, must-revalidate
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Content-Language: en
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Server: Kestrel
Date: Mon, 14 May 2018 17:30:00 GMT
X-Cache: MISS from firewall
X-Cache-Lookup: MISS from firewall:3128
Via: 1.0 firewall (squid/3.1.20)
Connection: close
{"operationCode":11110100,"information":"The pack is active.","state":"Active"}
Bellow is my simple code. In file /tmp/data.json I only get empty brackets {}, and oResponse:ContentLength is 0.
When I tried access JSON values, I got Progress error:
Call to Progress.Json.ObjectModel.JsonObject:GetCharacter( ) failed. Property 'state' was not found. (16058)
oRequest = RequestBuilder:get(httpUrl)
:AcceptJson()
:AddHeader("Authorization", access_token)
:AddHeader("emvs-data-entry-mode", "manual")
:AddHeader("Accept-Language", "en")
:WithTransferEncoding(OpenEdge.Net.HTTP.TransferEncodingEnum:Chunked)
:HttpVersion("HTTP/1.1")
:request.
oResponse = ClientBuilder:Build():Client:Execute(oRequest).
if oResponse:StatusCode <> 200 then
message 'ERROR: Data retrieving..' ' HTTP Status Code:' oResponse:StatusCode oResponse:StatusReason view-as alert-box.
if oResponse:ContentType = 'application/json' then
cast(oResponse:Entity, JsonObject):WriteFile('/tmp/data.json').
message oResponse:StatusCode oResponse:Version oResponse:ContentLength view-as alert-box.
Any help would be appreciated.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
The issue was finally solved in a way that new version of API to which OE HTTP client makes request, returns responses exclusively in HTTP version 1.1, which enables OpenEdge to read all of the response (body too) correctly.
If that is a chatbot it is not doing a very good job, can someone turn it off or at least create some variations? :)
Hi.
I face the exact same problem. Running a request on Windows: everything works fine. Run it on Linux: error.