lang | file functions
MapForce provides the ability to read BLOB (binary large object) data from binary files into a mapping, and then consume it without changing the internal structure of the binary data (raw). For example, you can save binary data to a database BLOB field, to a field of type xs:base64Binary in an XML file, or send it to a Web service*.
* Web service calls are supported in MapForce Enterprise Edition only.
You can also create mappings that read binary data from some source (such as a BLOB field in a database, a field of type xs:base64Binary in an XML file, or a Web service) and then write binary files to the disk. The list below illustrates some of the possible scenarios in which binary files might be useful:
•Extract binary content encoded as base-64 data from an XML file and save it to the disk (for example, as a PDF file)
•Process image files stored on the disk and send them as base-64 encoded binary content to a Web service
•Extract BLOB content from a database table and save it as image files to the disk (one image file for each row in the database table)
•Read image files from the disk and save them to a database table as BLOB data fields.
Note: | Mapping data to or from binary files requires BUILT-IN as a transformation language. You can preview the mapping in MapForce (and save the output files, if any) or choose to execute it with MapForce Server (licensed separately) on a different computer or platform. It is not supported to generate an executable C#, C++, or Java program from mappings that read or write binary files. |
Read from and write to binary files
As such, there is no component kind associated with binary files in MapForce, like it is the case, for example, with XML, text, or JSON files. Instead, to help you accomplish goals such as the ones above, the following MapForce built-in functions are available: