Hi Danny,
yes correct. the requirement here is to process the plain XML configured in VSI to a compressed format (normal Zip). in this case how will you compress the plain xml's from VSI using Response side DPH ? and to which property you will put this compressed data into (for two compressed responses)?
Could you please help me understand on this
this is other question :
Also i have tried adding the following code to zip the response message. it is a normal zip not gzip. getting the below error:
Target exception: java.util.zip.ZipException: no current ZIP entry
i hope i'm missing out putNextEntry(); method or something else. Please help me fix this issue. PFA the code for GZIP which is working perfect. But i need the code working for normal zip as this is my requirement.
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.ZipOutputStream;
String str = testExec.getStateValue("responseMessage"); //responseMessage is a plain XML
if (str == null || str.length() == 0) {
return str;
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
java.util.zip.ZipOutputStream gzip = new java.util.zip.ZipOutputStream(out);
gzip.write(str.getBytes());
gzip.close();
zipString = out.toString("ISO-8859-1");
zipBytes = out.toByteArray();
testExec.setStateValue("zipString", zipString);
testExec.setStateValue("zipBytes", zipBytes);
return out;