Package javax.xml.stream

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


                        writeObject(marshaller, writer, newJAXBElement(mname, String.class, o));
                    }
                }
            }

            writer.writeEndElement();
            writer.flush();
        } catch (Exception e) {
            throw new Fault(new Message("MARSHAL_ERROR", LOG, e.getMessage()), e);
        } finally {
            StaxUtils.close(writer);
View Full Code Here


        public void handleMessage(SoapMessage message) throws Fault {
            try {
                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndElement();           
                    // Write Envelope end element
                    xtw.writeEndElement();
                    xtw.writeEndDocument();
                   
                    xtw.flush();
View Full Code Here

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

                dataWriter.write(arg, header.getPart(), xtw);
            }
           
            if (startedHeader || preexistingHeaders) {
                try {
                    xtw.writeEndElement();
                    endedHeader = true;
                } catch (XMLStreamException e) {
                    throw new SoapFault(new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE),
                        e, soapVersion.getSender());
                }
View Full Code Here

                String text = String.valueOf((int)(Math.random() * 10000));
                StringWriter out = new StringWriter();
                XMLStreamWriter writer = factory.createXMLStreamWriter(out);
                writer.writeStartElement("root");
                writer.writeCharacters(text);
                writer.writeEndElement();
                writer.writeEndDocument();
                writer.flush();
                writer.close();
                assertEquals("<root>" + text + "</root>", out.toString());
            }
View Full Code Here

        for (HtmlColumn column : row.getColumns(ReservedFormat.ALL, ReservedFormat.XML)) {
          writer.writeAttribute(headers.get(i), column.getContent().toString());
          i++;
        }

        writer.writeEndElement();
      }

      writer.writeEndElement();
      writer.writeEndDocument();
      writer.flush();
View Full Code Here

        }

        writer.writeEndElement();
      }

      writer.writeEndElement();
      writer.writeEndDocument();
      writer.flush();

    } catch (XMLStreamException e) {
      StringBuilder sb = new StringBuilder("Something went wrong during the XML generation of the table '");
View Full Code Here

            for (Iterator<Page> children = page.listChildren(new PageFilter(), true); children.hasNext();) {
                write(children.next(), stream, resourceResolver);
            }

            stream.writeEndElement();

            stream.writeEndDocument();
        } catch (XMLStreamException e) {
            throw new IOException(e);
        }
View Full Code Here

            // Write all protocols
            for (ProtocolInfo protocol : protocols.values())
                writeProtocol(xml, protocol);

            // End document
            xml.writeEndElement();
            xml.writeEndDocument();

        }
        catch (XMLStreamException e) {
            throw new GuacamoleServerException(
View Full Code Here

                xml.writeAttribute("name", user.getUsername());

            }

            // End document
            xml.writeEndElement();
            xml.writeEndDocument();

        }
        catch (XMLStreamException e) {
            throw new GuacamoleServerException(
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.