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

Thanks,
Mallik.

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();

com.wm.net.HttpHeader httpheader = Service.getHttpResponseHeader();

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

Service.setResponse(bytes);

Michael,
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.