title: Replace org.apache.cxf.helpers.DOMUtils.writeXml(Node n, OutputStream os) missing in Apache CXF version 3.1.16
body: <p>I'm migrating from <code>JBoss EAP 6.4</code> to <code>EAP 7.1</code>. I've updated Apache CXF from 2.7.14 to 3.1.16 but now I'm missing the <code>DOMUtils.writeXml(Node n, OutputStream os)</code> method. Which is the best way to replace it in a scenario like this?</p>
  
  <pre><code>SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
  SOAPBody env = soapMessage.getSOAPPart().getEnvelope().getBody();
  ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
  DOMUtils.writeXml(env, baos);
  String soapBody = baos.toString();
  </code></pre>