Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space EDITLWCLIENT and version 1.1.0

...

Note

To ensure compatibility with future versions of LightWave Client, the LIGHTWAVE-RQ-HEADER structure must be initialized to binary 0 before populating other values.

Code Block
languagetext
DEF EMPLOYEE-API-VAL.
  02 RQ-GET-EMPLOYEES                      PIC S9(4) COMP VALUE 1.
  02 RQ-ADD-EMPLOYEE                       PIC S9(4) COMP VALUE 3.
  02 RQ-ADD-EMPLOYEE-BLOB                  PIC S9(4) COMP VALUE 6.
  02 RQ-ADD-EMP-BLOB-FILE                  PIC S9(4) COMP VALUE 7.
  02 RQ-DELETE-EMPLOYEE                    PIC S9(4) COMP VALUE 4.
  02 RQ-GET-EMPLOYEE                       PIC S9(4) COMP VALUE 2.
  02 RQ-UPDATE-EMPLOYEE                    PIC S9(4) COMP VALUE 5.
END.
 
DEF LIGHTWAVE-RQ-HEADER.
  02 RQ-CODE                             TYPE BINARY 16.
  02 RQ-VERSION                          TYPE BINARY 16 UNSIGNED.
  02 RQ-TIMEOUT                          TYPE BINARY 32 UNSIGNED.
  02 RESERVED                            PIC X(24).
END.
 
!
! Operation:    GET /employees
! Description:  Get a list of employees
! Request Code: RQ-GET-EMPLOYEES
!
DEF GET-EMPLOYEES-RQ.
  02 LIGHTWAVE-RQ-HEADER                 TYPE LIGHTWAVE-RQ-HEADER.
  02 BEGIN-AFTER                         PIC X(20).
END.


Once the CLIENT process invokes the Web service method it returns the response in an IPM. This response IPM also contains a standard CLIENT header which contains a 2 byte response code. If the response code is zero, the remainder of the IPM consists of fields that correspond to the output parameters of the Web service method. If the response code is non-zero then the application should treat the response as an error.

Code Block
languagetext
DEF LIGHTWAVE-RP-HEADER.
  02 RP-CODE                             TYPE BINARY 16.
  02 HTTP-STATUS                         TYPE BINARY 16.
  02 INFO-CODE                           TYPE BINARY 16.
  02 INFO-DETAIL                         TYPE BINARY 16.
  02 RESERVED                            PIC X(24).
END.
 
DEF GET-EMPLOYEES-200-RP.
  02 LIGHTWAVE-RP-HEADER                 TYPE LIGHTWAVE-RP-HEADER.
  02 GET-EMPLOYEES-RESPONSE              TYPE GET-EMPLOYEES-RESPONSE.
END.


LightWave Client 1.2.5