How to decompress base64 zlib payload

Pooja
Tera Contributor

We are working on integration where the payload that we are receiving through GET method is base64 encoded, zlib compressed data. We need a way to decode this to show data in the readable/XML  format. 


tried in background script :


var base64Data = GlideStringUtil.base64Decode(my_string);
var data = base64Data();
gs.print(data);


the printed data is not in readable/XML format.
not sure how to decompress zlib. Any help is appreciated.

1 ACCEPTED SOLUTION

divya mishra
Tera Guru

Hi Pooja,

 

It is possible by utilizing the MID Server capabilities i.e. to make MIDServer do the bidding on behalf of ServiceNow. You can use the flow designer to talk to MIDServer and decompress the zlib files.

 

 

Thanks and Regards,

Divya Mishra

View solution in original post

1 REPLY 1

divya mishra
Tera Guru

Hi Pooja,

 

It is possible by utilizing the MID Server capabilities i.e. to make MIDServer do the bidding on behalf of ServiceNow. You can use the flow designer to talk to MIDServer and decompress the zlib files.

 

 

Thanks and Regards,

Divya Mishra