contentHandler.startDocument();
contentHandler.startPrefixMapping("S",soapNsUri);
contentHandler.startElement(soapNsUri,"Envelope","S:Envelope",EMPTY_ATTS);
if(hasHeaders()) {
contentHandler.startElement(soapNsUri,"Header","S:Header",EMPTY_ATTS);
MessageHeaders headers = getHeaders();
for (Header h : headers.asList()) {
h.writeTo(contentHandler,errorHandler);
}
contentHandler.endElement(soapNsUri,"Header","S:Header");
}
// write the body