I have SOAP service that has response with zip-file (binary) that contains number of pdf files. I need to unzip this file and save pdf files separetely for different SuccessFactors Odata entities.
Response of SOAP service looks like:
After soap call I put binary from response to dpp.
After this I try to use Data process shape for unzip file and parse pdf files.
Logger logger = ExecutionUtil.getBaseLogger();
byte bin = ExecutionUtil.getDynamicProcessProperty("binary").getBytes();
ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(bin));
logger.warning("zipStream "+zipStream+" nextEntry "+zipStream.getNextEntry());
In test mode nextEntry always null but zipStream always exist.
I try to make
byte  byteZip= child.getText().getBytes("UTF-8");
ZipInputStream zipStream = new ZipInputStream(newByteArrayInputStream(byteZip) or .Charset.forName("UTF-8"))
but I always have same result.
So i have next question:
1.How i can unzip file and get it entries in groovy?
2. How i can set content of, for example, Attachment entities if content field must be base64 encoded?