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 Server JSON support, or the message payload is larger than the maximum message size allowed by an interprocess message. For these cases LightWave Server 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 a field data type as "blob", 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 LightWave Server process in any way. The sizeIs attribute may be used to reference a field that contains the actual size of the data to send or the size of the data that was received. The maximum size of an IPM blob is 2MB, minus the size of all other fields in the IPM.
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 a field data type as "blobFile", the field contains the name of the Enscribe file containing the BLOB data. For web service requests, LightWave Server creates the BLOB file and supplies the file name in the blobFile field in the request IPM to the application server. For web service responses, the application server supplies the BLOB file name in the reply IPM. The LightWave Server SERVER / SWORKER processes must have read access to the file.
BLOB files are created by the LightWave Server processes as type 180 files (binary stream) in the location specified by the SERVER process --blob-files startup option. Note that the application is responsible for the disposal of the request and response BLOB files. See SERVER for more information on the --blob-files startup option.