Package com.caucho.xml.stream

Examples of com.caucho.xml.stream.XMLStreamReaderImpl


  private String scanEjbJarXml(Path ejbJarXml)
  {
    // XXX use Config.configure once com.caucho.ejb.cfg allows configuration
    // without a live EjbManager
    try {
      XMLStreamReaderImpl reader
        = new XMLStreamReaderImpl(ejbJarXml.openRead());

      while (reader.hasNext()) {
        if (reader.next() == XMLStreamReader.START_ELEMENT
            && "module-name".equals(reader.getLocalName()))
          return reader.getElementText();
      }
    }
    catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
View Full Code Here


    throws WebServiceException
  {
    boolean foundBody = false;

    try {
      XMLStreamReaderImpl reader = new XMLStreamReaderImpl(in);

      // skip the Envelope
      reader.nextTag();

      if (reader.getEventType() != reader.START_ELEMENT ||
          ! "Envelope".equals(reader.getLocalName())) {
        throw new WebServiceException(L.l("Invalid response from server: No Envelope found"));
      }

      // find the body
      while (reader.hasNext()) {
        reader.next();

        if (reader.getEventType() == reader.START_ELEMENT &&
            "Body".equals(reader.getLocalName())) {

          // Copy the body contents to a StreamDataHandler
          reader.nextTag();

          XMLStreamWriterImpl xmlWriter = new XMLStreamWriterImpl(out, false);

          StaxUtil.copyReaderToWriter(reader, xmlWriter);
View Full Code Here

    throws WebServiceException
  {
    boolean foundBody = false;

    try {
      XMLStreamReaderImpl reader = new XMLStreamReaderImpl(in);

      // skip the Envelope
      reader.nextTag();

      if (reader.getEventType() != reader.START_ELEMENT ||
          ! "Envelope".equals(reader.getLocalName())) {
        throw new WebServiceException(L.l("Invalid response from server: No Envelope found"));
      }

      // find the body
      while (reader.hasNext()) {
        reader.next();

        if (reader.getEventType() == reader.START_ELEMENT &&
            "Body".equals(reader.getLocalName())) {

          // Copy the body contents to a StreamDataHandler
          reader.nextTag();

          XMLStreamWriterImpl xmlWriter = new XMLStreamWriterImpl(out, false);

          StaxUtil.copyReaderToWriter(reader, xmlWriter);
View Full Code Here

TOP

Related Classes of com.caucho.xml.stream.XMLStreamReaderImpl

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.