public void testElementPullStream1() throws Exception {
OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(
OMAbstractFactory.getSOAP11Factory(),
reader);
SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
StreamingOMSerializer serializer = new StreamingOMSerializer();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
writer =
XMLOutputFactory.newInstance().
createXMLStreamWriter(byteArrayOutputStream);
serializer.serialize(env.getXMLStreamReaderWithoutCaching(), writer);
writer.flush();
String outputString = new String(byteArrayOutputStream.toByteArray());
assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1);
}