Message requestMessage = msgContext.getRequestMessage();
Message responseMessage = new Message(requestMessage.getSOAPEnvelope());
String[] fooHeader = requestMessage.getMimeHeaders().getHeader("foo");
if (fooHeader != null) {
responseMessage.getMimeHeaders().addHeader("foo", fooHeader[0]);
}
msgContext.setResponseMessage(responseMessage);