Page tree
Skip to end of metadata
Go to start of metadata

There may be cases where an application requires more control over the Web service request or response payload. For example, the Web service requires a message structure that can't be created or parsed by the native LightWave Client JSON support, or the message payload is larger than the maximum message size allowed by an interprocess message. For these cases LightWave Client supports the BLOB data type.

When using BLOBs (Binary Large Objects), your application provides or receives the Web service payload as raw data in the IPM or in an Enscribe file. When a file is used, the name of the file is supplied in the request and/or response IPMs.

Using IPM BLOBs

When an API definition specifies the HTTP Response Body Source or Target Content Schema as BLOB, and the Data Source or Target as IPM, the DDL generated for the operation will contain a single character field representing the data that is to be sent with the request or that was received in the response. The BLOB-SIZE field indicates the actual size of the data to send or the size of the data that was received. The data in the BLOB field represents exactly the data that is to be sent or that was received, it is not manipulated by the CLIENT process in any way. The maximum size of an IPM blob is 2097116.

DEF ADD-EMPLOYEE-BLOB-RQ.
  02 LIGHTWAVE-RQ-HEADER                 TYPE LIGHTWAVE-RQ-HEADER.
  02 BLOB-SIZE                           TYPE BINARY 32 UNSIGNED.
  02 BLOB                                PIC X(4096).
END.

DEF ADD-EMPLOYEE-BLOB-201-RP.
  02 LIGHTWAVE-RP-HEADER                 TYPE LIGHTWAVE-RP-HEADER.
  02 BLOB-SIZE                           TYPE BINARY 32 UNSIGNED.
  02 BLOB                                PIC X(4096).
END.


Using File BLOBs

File BLOBs are similar to IPM BLOBs but Enscribe files are used to transfer the data. When an API definition specifies the HTTP Response Body Source or Target Content Schema as BLOB, and the Data Source or Target as FILE, the DDL generated for the operation will contain a single character field representing the name of the Enscribe file representing the data that is to be sent with the request or that was received in the response. The data in the file BLOB represents exactly the data that is to be sent or that was received, it is not manipulated by the CLIENT process in any way. File BLOBs are Enscribe unstructured files that are treated as binary streams by the CLIENT process.

Request BLOB files are created by the application and their location is provided in the request IPM. Note that EDIT files (type 101) are read as text files and will be transferred with each line ending in a single newline (0x0A) character. All other file types are transferred as binary streams.

Response BLOB files are created by the CLIENT process as type 180 files (binary stream) in the location specified by the CLIENT process --blob-files startup option. The name of the file is returned in the response IPM. Note that the application is responsible for the disposal of the request and response BLOB files. See CLIENT for more information on the --blob-files startup option.

DEF ADD-EMP-BLOB-FILE-RQ.
  02 LIGHTWAVE-RQ-HEADER                 TYPE LIGHTWAVE-RQ-HEADER.
  02 BLOB-FILE-NAME                      PIC X(256).
END.

DEF ADD-EMP-BLOB-FILE-201-RP.
  02 LIGHTWAVE-RP-HEADER                 TYPE LIGHTWAVE-RP-HEADER.
  02 BLOB-FILE-NAME                      PIC X(256).
END.
  • No labels


LightWave Client 1.1.2