// write body
MessageFormatterEx messageFormatterEx;
if (messageFormatter instanceof MessageFormatterEx) {
messageFormatterEx = (MessageFormatterEx)messageFormatter;
} else {
messageFormatterEx = new MessageFormatterExAdapter(messageFormatter);
}
DataHandler dataHandler = new DataHandler(messageFormatterEx.getDataSource(msgContext, format, msgContext.getSoapAction()));
MimeMultipart mimeMultiPart = null;