X4 Produktdokumentation

Operation: Zip

With the Zip operation of the ZIP in Memory Converter, you create a ZIP archive with the data from the input XML document in memory.

For more information on other operations of the ZIP in Memory Converter, see ZIP in Memory Converter.

Parameters

encoding

Character encoding for file/path names

Possible values:

  • Any valid string (e.g. UTF-8)

  • CP850: MS-DOS Germany, is generated by MS Windows in this way (default)

  • (empty): UTF-8 (for backward compatibility with older X4 Server versions

Status values

1

The operation was executed successfully.

-1

The operation failed due to a technical error.

Input

With the Zip operation, the adapter expects an adapter-specific input XML structure. This structure includes the file name and the Base64-encoded file contents for each file that is to be included in the ZIP archive. Thus, each <File> element represents a file, each <Directory> element represents an empty folder in the ZIP archive.

<Archiv>
    <File name="Dateiname" comment="Optionaler Kommentar">
        <!--Base64-kodierte Daten-->
    </File>
    <Directory name="Ordnername/" />
</Archiv>

Output

The adapter creates a ZIP archive in memory from the data in the input XML document.