if (message.getSoapHeaders().size() > 0) {
StaxUtil.writeStartElement(writer, soapVersion.getHeader());
for (Iterator it = message.getSoapHeaders().values().iterator(); it.hasNext();) {
DocumentFragment df = (DocumentFragment) it.next();
Element e = DomUtil.getFirstChildElement(df);
StaxUtil.copy(new DOMStreamReader(e), writer);
}
writer.writeEndElement();
}
// Write Body
StaxUtil.writeStartElement(writer, soapVersion.getBody());