public void invoke(MessageContext context)
throws Exception
{
OutMessage message = (OutMessage) context.getCurrentMessage();
W3CDOMStreamWriter writer = new W3CDOMStreamWriter(builder);
message.getSerializer().writeMessage(message, writer, context);
Document doc = writer.getDocument();
message.setProperty(DOM_MESSAGE, doc);
message.setSerializer(new DOMSerializer());
}