try {
SOAPConstants soapConstants = messageContext.getSOAPConstants();
String contentType1 = responseMessage.getContentType(soapConstants);
res.setContentType(contentType1);
// Transfer MIME headers to HTTP headers for response message.
MimeHeaders responseMimeHeaders = responseMessage.getMimeHeaders();
for (Iterator i = responseMimeHeaders.getAllHeaders(); i.hasNext();) {
MimeHeader responseMimeHeader = (MimeHeader) i.next();
res.setHeader(responseMimeHeader.getName(),
responseMimeHeader.getValue());
}
//TODO discuss this with dims.