Examples of writeEndDocument()


Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()

        XMLStreamWriter writer = buffer.createFromXMLStreamWriter();
        writer.writeStartDocument();
        writer.writeStartElement("foo");
        writer.writeCharacters("body");
        writer.writeEndElement();
        writer.writeEndDocument();

        assertTrue(buffer.isCreated());

        XMLStreamReader reader = buffer.readAsXMLStreamReader();
        assertEquals(XMLStreamConstants.START_DOCUMENT,reader.getEventType());
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()

       
        assertEquals(null, writer.getPrefix("http://ns3"));
        assertEquals(null, writer.getPrefix("http://ns4"));
        assertEquals("", writer.getPrefix("http://default"));
       
        writer.writeEndDocument();

       
        XMLStreamReader reader = buffer.readAsXMLStreamReader();
        assertEquals(XMLStreamConstants.START_DOCUMENT,reader.getEventType());
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()

        public void handleMessage(Message message) throws Fault {
            try {
                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.flush();
                    xtw.close();
                }
                /*
                if (xtw instanceof StAXDocumentSerializer) {
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()

                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndElement();           
                    // Write Envelope end element
                    xtw.writeEndElement();
                    xtw.writeEndDocument();
                   
                    xtw.flush();
                }
            } catch (XMLStreamException e) {
                SoapVersion soapVersion = message.getVersion();
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeEndDocument()

        public void handleMessage(Message message) throws Fault {
            try {
                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.flush();
                    xtw.close();
                }

                OutputStream os = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
View Full Code Here

Examples of net.java.textilej.util.XmlStreamWriter.writeEndDocument()

   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
   
    return out.toString();
   
  }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeEndDocument()

        // Marshal the value
        writer.writeStartDocument();
        writer.writeStartElement("root");
        context.marshal(jaxbElement, writer);
        writer.writeEndElement();
        writer.writeEndDocument();
        writer.flush();
       
        assertTrue(baos.toString().indexOf("Hello World") > 0);
        assertTrue(baos.toString().indexOf("</root>") > 0);
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.json.utils.PrefixCollectingXMLStreamWriter.writeEndDocument()

            XMLStreamWriter spyingWriter = new PrefixCollectingXMLStreamWriter(w3cStreamWriter,
                                                                               namespaceMap);
            spyingWriter.writeStartDocument();
            // use type qname as element qname?
            aegisWriter.write(obj, aegisType.getSchemaType(), false, spyingWriter, aegisType);
            spyingWriter.writeEndDocument();
            spyingWriter.close();
            Document dom = w3cStreamWriter.getDocument();
            // ok, now the namespace map has all the prefixes.
           
            String enc = HttpUtils.getSetEncoding(m, headers, "UTF-8");
View Full Code Here

Examples of org.codehaus.jettison.AbstractXMLStreamWriter.writeEndDocument()

        w.writeStartElement("subchild1");
        w.writeCharacters("sub1");
        w.writeEndElement();
       
        w.writeEndElement();
        w.writeEndDocument();
       
        w.close();
        strWriter.close();
        String expected = "{\"root\":{\"subchild1\":[{\"subchild2\":[5,3.14,true,\"000123\",\"Infinity\"]},\"sub1\"]}}";
        String actual = strWriter.toString();
View Full Code Here

Examples of org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter.writeEndDocument()

       
        w.writeStartDocument();
        w.writeStartElement("alice");
        w.writeCharacters("bob");
        w.writeEndElement();
        w.writeEndDocument();
       
        w.close();
        strWriter.close();
       
        assertJSONEquals("{\"alice\":{\"$\":\"bob\"}}", strWriter.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.