Transfer data in large objects
Use the BYTE
and TEXT
data types to transfer large
objects (LOBs) with a Genero RESTful web service.
Specify an input or return parameter of a Web service function as a TEXT
or BYTE
type in order to transfer a large object (LOB) to a web service server or client.
Which object to use
Situation | Data type to use |
---|---|
Your web service transfers binary file
contents. For example: an image, PDF, zip file, etc. |
BYTE |
You have a binary large object (BLOB) stored in a table and your web service must write it
out to a file. For example, an image. |
BYTE |
Your web service transfers ASCII content.
For example: text, HTML, etc. |
TEXT |
This method transfers data in the message body.
To send a LOB from a REST client function you must, LOCATE
it in memory or file to load the data
before calling the server function. On the server REST function, you do not need to locate the
input parameters TEXT
/BYTE
types as they are implicitly located
in memory when the server function is called. See code samples in Upload a large object in the request body.