}
}
// read SOAP headers from saved input stream
RewindableInputStream is = (RewindableInputStream)message.get(RMMessageConstants.SAVED_CONTENT);
is.rewind();
XMLStreamReader reader = StaxUtils.createXMLStreamReader(is, "UTF-8");
message.getHeaders().clear();
if (reader.getEventType() != XMLStreamConstants.START_ELEMENT
&& reader.nextTag() != XMLStreamConstants.START_ELEMENT) {
throw new IllegalStateException("No document found");