Examples of XMLStreamReaderToXMLStreamWriter


Examples of org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter

  protected XMLStreamReaderToXMLStreamWriter readerToWriter;
  protected XMLStreamReaderToXMLStreamWriter.Breakpoint breakpoint;
 
 
  public StaxBridge(SOAPPartImpl soapPart) throws SOAPException {
    readerToWriter = new XMLStreamReaderToXMLStreamWriter();
    saajWriter = new SaajStaxWriter(soapPart.message, soapPart.getSOAPNamespace());
  }
View Full Code Here

Examples of org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter

                        metadata,wsdlAddress, wsdlTargetNamespace, attributes);

                //write extensibility elements in the EPR element
                if (extns != null) {
                    for (EPRExtension e : extns) {
                        XMLStreamReaderToXMLStreamWriter c = new XMLStreamReaderToXMLStreamWriter();
                        XMLStreamReader r = e.readAsXMLStreamReader();
                        c.bridge(r, writer);
                        XMLStreamReaderFactory.recycle(r);
                    }
                }

                writer.writeEndElement();
View Full Code Here

Examples of org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter

        XMLStreamWriter w = null;
        try {
            //generate the WSDL with utf-8 encoding and XML version 1.0
            w = XMLStreamWriterFactory.create(os, "UTF-8");
            w.writeStartDocument("UTF-8", "1.0");
            new XMLStreamReaderToXMLStreamWriter().bridge(source.read(), w);
            w.writeEndDocument();
        } catch (XMLStreamException e) {
            IOException ioe = new IOException(e.getMessage());
            ioe.initCause(e);
            throw ioe;
View Full Code Here

Examples of org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter

      if (readBridge != null && readBridge instanceof StaxLazySourceBridge) {
//          StaxSoapWriteBridge writingBridge =  new StaxSoapWriteBridge(this);
//          writingBridge.write(writer);    
          final String soapEnvNS = this.getNamespaceURI();
          final DOMStreamReader reader = new DOMStreamReader(this);
          XMLStreamReaderToXMLStreamWriter writingBridge =  new XMLStreamReaderToXMLStreamWriter();         
          writingBridge.bridge( new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, writer) {
            public boolean proceedAfterStartElement()  {
              if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
                return false;
              } else
                return true;
            }
            });//bridgeToBodyStartTag
            ((StaxLazySourceBridge)readBridge).writePayloadTo(writer);
            writer.writeEndElement();//body        
            writer.writeEndElement();//env
            writer.writeEndDocument();
            writer.flush();    
      } else {
          LazyEnvelopeStaxReader lazyEnvReader = new LazyEnvelopeStaxReader(this);
          XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter();
          writingBridge.bridge(lazyEnvReader, writer);
//            writingBridge.bridge(new XMLStreamReaderToXMLStreamWriter.Breakpoint(lazyEnvReader, writer));
      }
        //Assume the staxBridge is exhausted now since we would have read the body reader
        ((BodyImpl) getBody()).setPayloadStreamRead();
    }
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.