Sending http response as zip stream

Hi I have a situation where i have to return the response for a http request
in the form of zip stream. Can someone provide me a direction on how to
return the zip stream back and also what/how to set the content-type.
The built in service doesn’t seem to help.
Your help is really appreciated


It seems most of the guys have taken days off for holidays.
Happy New year guys.

I used the following code (obtained from wmusers) recently to embed my binary data in the HTTP response.

IDataCursor idc = pipeline.getCursor();
byte[] bytes = (byte [])IDataUtil.get(idc, “bytes”);
String encoding = IDataUtil.getString(idc, “encoding”);
String contentType = IDataUtil.getString(idc, “contentType”);
String handle = IDataUtil.getString(idc, “handle”);
idc.destroy(); httpheader = Service.getHttpResponseHeader();

if(httpheader != null) {
if(contentType!=null && !contentType.equals(""))
httpheader.addField(“content-type”, contentType);
if(encoding!=null && !encoding.equals(""))
if(handle != null && !handle.equals(""))
“inline;filename= “” + handle + “””);


Sorry for the late response.
I have been on a long vacation to India
Once again thanks for the response.
I will try this one and will let you know how it works.