Package org.apache.synapse.util

Examples of org.apache.synapse.util.WrappedTextNodeStreamReader


    private void testUsingBuilder(QName wrapperElementName,
                                  String testString,
                                  int chunkSize) {
        StringReader reader = new StringReader(testString);
        XMLStreamReader xmlStreamReader
            = new WrappedTextNodeStreamReader(wrapperElementName, reader, chunkSize);
        OMElement element = new StAXOMBuilder(xmlStreamReader).getDocumentElement();
        assertEquals(wrapperElementName, element.getQName());
        assertEquals(wrapperElementName.getPrefix(), element.getQName().getPrefix());
        assertEquals(testString, element.getText());
    }
View Full Code Here


                                     String testString,
                                     int chunkSize,
                                     String expectedXML) throws Exception {
        StringReader reader = new StringReader(testString);
        XMLStreamReader xmlStreamReader
            = new WrappedTextNodeStreamReader(wrapperElementName, reader, chunkSize);
        StringWriter writer = new StringWriter();
        XMLStreamWriter xmlStreamWriter
            = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
        new StreamingOMSerializer().serialize(xmlStreamReader, xmlStreamWriter);
        xmlStreamWriter.flush();
View Full Code Here

                                              String testString,
                                              int chunkSize,
                                              String expectedXML) throws Exception {
        StringReader reader = new StringReader(testString);
        XMLStreamReader xmlStreamReader
            = new WrappedTextNodeStreamReader(wrapperElementName, reader, chunkSize);
        OMElement element = new StAXOMBuilder(xmlStreamReader).getDocumentElement();
        StringWriter writer = new StringWriter();
        element.serializeAndConsume(writer);
        assertXMLEqual(expectedXML, writer.toString());
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.util.WrappedTextNodeStreamReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.