API Gateway: Converting a Zip File to Binary Format

book

Article ID: 194443

calendar_today

Updated On:

Products

CA API Gateway API SECURITY STARTER PACK-7

Issue/Introduction

There is a zip file that is created using the gateway assertions. That zip file needs to be converted into a binary format. 

Environment

API Gateway: 9.4

Resolution

You can use the Encode/Decode Assertion to do this conversion. The assertion should look something like the following:

Additional Information

In the attached sample policy (zip2bin.xml):

+ Route via SSH2 Assertion that grabs a ZIP file from the gateway server; the ZIP file is stored in the ${response.mainpart} context variable

+ Encode/Decode Assertion

+ Return Template Response to Requestor assertion that displays the binary format

Attachments

1594045496894__zip2bin.xml get_app