private void readHeaders(XMLStreamReader xmlReader, SoapMessage message) throws XMLStreamException {
// read header portion of SOAP document into DOM
SoapVersion version = message.getVersion();
XMLStreamReader filteredReader = new PartialXMLStreamReader(xmlReader, version.getBody());
Node nd = message.getContent(Node.class);
W3CDOMStreamWriter writer = message.get(W3CDOMStreamWriter.class);
Document doc = null;
if (writer != null) {
StaxUtils.copy(filteredReader, writer);