cancel
Showing results for 
Search instead for 
Did you mean: 

Uncompress data in a specific field?

Former Member
0 Kudos

Hi all.

If I get an payload with where one of the fields has compressed data.

How would I uncompress the data?

BR

Kalle

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184720
Active Contributor
0 Kudos

Hi Kalle - As it's not the entire xml, i don't prefer writing a java mapping/adapter modue, instead i think you can write a simple udf and pass the compressed field as input to it.

Sample prog to decompress :

http://java2novice.com/java-collections-and-util/zip/decompress-byte-array/

http://stackoverflow.com/questions/16351668/compression-and-decompression-of-string-data-in-java

Former Member
0 Kudos

Hi Kallen Person,

Another possibility is XI Adapter Framework in your adapter. Follow example:

Regards

Marcelo Macedo

Shabarish_Nair
Active Contributor
0 Kudos

If there is a requirement as such, then you will use a java mapping and use any java library to process the compressed data in a particular field.

ex. Compressing and Decompressing Data Using Java APIs

Harish
Active Contributor
0 Kudos

Hi Kalle,

XML Compression is binary XML (compact representation of XML). Compression is done on message level in AS2 adapter (as standard feature) and you have different algorithm to compress the data.

It is not common to compress only one field in XML, so please check if you want to uncompressed the whole XML or one field. Also check what algorithm is used to compress the data.

regards,

Harish