Rest Web Services

Posted by ctoman on 16-Sep-2016 13:26

OE 11.4

HP-UX 11.31

Making a WS call from UNIX sometimes works and sometimes does not.  From Windows the WS call works all the time.

basic ABL program and I have a cert in $DLC/certs

DEFINE VARIABLE lcRequest        AS LONGCHAR  NO-UNDO.
DEFINE VARIABLE cStatus          AS CHARACTER NO-UNDO.
DEFINE VARIABLE lcResponse       AS LONGCHAR  NO-UNDO.
DEFINE VARIABLE lcReply          AS LONGCHAR  NO-UNDO.

run tstwsrestget.p ( INPUT "GET",
            INPUT "69.89.205.217",
            INPUT "443",
            INPUT "Basic " + "S0VJU0hBTUFSU0hBTEw6ZDJ3NHg4bmI3Ng==",
            INPUT "/prod/mqsr.backoffice/orderservice.asmx/GetOrderByNumber",
            INPUT "marvinOrderNumber=SKZ00014",
            OUTPUT lcRequest,
            OUTPUT cStatus,
            OUTPUT lcResponse,
            OUTPUT lcReply ) no-error.

Thanks in Advance!

All Replies

Posted by Brian K. Maher on 16-Sep-2016 13:30

please define “sometimes it does not”.

Posted by ctoman on 16-Sep-2016 13:37

I run the program 19 times and get no content and on the 20th time I get data.

Posted by ctoman on 16-Sep-2016 13:39

results:

┌──── Information ─────┐

│    No-Content :      │

│ ──────────────────── │

│     <OK> <Help>      │

└──────────────────────┘

┌────────────────── Information ──────────────────

│                    Success

│                HTTP/1.1 200 OK

│       Cache-Control: private, max-age=0

│     Content-Type: text/xml; charset=utf-8

│           Server: Microsoft-IIS/7.5

│          X-AspNet-Version: 4.0.30319

│             X-Powered-By: ASP.NET

│      Date: Fri, 16 Sep 2016 18:37:43 GMT

│               Connection: close

│             Content-Length: 958508

│ Set-Cookie: OMS=2316566794.20480.0000; path=/

│              Vary: Accept-Encoding

│ ───────────────────────────────────────────────

Posted by Peter Judge on 16-Sep-2016 13:46

What’s in the .P ? If it uses ABL sockets, then there’s a known issue  with SSL (assuming that ‘cos port 443). The bug number is PSC00339091 ; you’ll need to contact Tech Support to get more help  - whether it affects your version etc.

Posted by ctoman on 16-Sep-2016 13:49

here is the code to build the socket

DO:

   CREATE SOCKET vSocket.

   vSocket:SET-READ-RESPONSE-PROCEDURE ("readHandler",THIS-PROCEDURE).

   ASSIGN

       wstatus = vSocket:CONNECT("-H " + ip-host

                                 + " -S " + ip-port

                                 + " -ssl"

                                 + " -nohostverify"

                                 + " -clientConnectTimeout " + STRING({&CONECTT

IMEOUTMS})) NO-ERROR.

This thread is closed