// Transfer HTTP headers of HTTP message to MIME headers of SOAP message
Header[] responseHeaders = method.getResponseHeaders();
MimeHeaders responseMimeHeaders = outMsg.getMimeHeaders();
for (int i = 0; i < responseHeaders.length; i++) {
Header responseHeader = responseHeaders[i];
responseMimeHeaders.addHeader(responseHeader.getName(),
responseHeader.getValue());
}
outMsg.setMessageType(Message.RESPONSE);
// It's definitely not safe to not release the connection back to the pool until after the
// successful execution of the following line (which, presumably, registers the