Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMXMLStreamReader


                }
            }
        }
       
        // The om tree was built by hand and is already complete
        OMXMLStreamReader reader;
        boolean done = container.isComplete();
        if ((builder == null) && done) {
            reader = new OMStAXWrapper(null, container, false, configuration.isPreserveNamespaceContext());
        } else {
            if ((builder == null) && !cache) {
View Full Code Here


       
        // Build tree
        root.build();
       
        // Use tree as input to XMLStreamReader
        OMXMLStreamReader xmlStreamReader = (OMXMLStreamReader) root.getXMLStreamReader();
       
        // Issue XOP:Include events for optimized MTOM text nodes
        xmlStreamReader.setInlineMTOM(false);
       
        DataHandler dh = null;
        while(xmlStreamReader.hasNext() && dh == null) {
            xmlStreamReader.next();
            if (xmlStreamReader.isStartElement()) {
                QName qName =xmlStreamReader.getName();
                if (XOP_INCLUDE.equals(qName)) {
                    String hrefValue = xmlStreamReader.getAttributeValue("", "href");
                    if (hrefValue != null) {
                        dh =((OMAttachmentAccessor)xmlStreamReader).getDataHandler(hrefValue);
                    }
                }
            }
        }
        assertTrue(dh != null);  
       
        // Make sure next event is an an XOP_Include END element
        xmlStreamReader.next();
        assertTrue(xmlStreamReader.isEndElement());
        assertTrue(XOP_INCLUDE.equals(xmlStreamReader.getName()));
       
        // Make sure the next event is the end tag of name
        xmlStreamReader.next();
        assertTrue(xmlStreamReader.isEndElement());
        assertTrue("name".equals(xmlStreamReader.getLocalName()));
    }
View Full Code Here

                }
            }
        }
       
        // The om tree was built by hand and is already complete
        OMXMLStreamReader reader = null;
        boolean done = ((OMSerializableImpl)container).done;
        if ((builder == null) && done) {
            reader =  new OMStAXWrapper(null, container, false);
        } else {
            if ((builder == null) && !cache) {
View Full Code Here

        System.out.println("....restored message context.....");   
        env = restoredMC.getEnvelope();
        env.build();
       
        // Use tree as input to XMLStreamReader
        OMXMLStreamReader xmlStreamReader = (OMXMLStreamReader) env.getXMLStreamReader();
       
        // Issue XOP:Include events for optimized MTOM text nodes
        xmlStreamReader.setInlineMTOM(false);
       
        DataHandler dh = null;
        while(xmlStreamReader.hasNext()) {
            xmlStreamReader.next();
            if (xmlStreamReader.isStartElement()) {
                QName qName =xmlStreamReader.getName();
                if (XOP_INCLUDE.equals(qName)) {
                    String hrefValue = xmlStreamReader.getAttributeValue("", "href");
                    if (hrefValue != null) {
                        dh =((OMAttachmentAccessor)xmlStreamReader).getDataHandler(hrefValue);
                    }
                }
            }
View Full Code Here

        TestLogger.logger.debug("....restored message context.....");   
        env = restoredMC.getEnvelope();
        env.build();
       
        // Use tree as input to XMLStreamReader
        OMXMLStreamReader xmlStreamReader = (OMXMLStreamReader) env.getXMLStreamReader();
       
        // Issue XOP:Include events for optimized MTOM text nodes
        xmlStreamReader.setInlineMTOM(false);
       
        DataHandler dh = null;
        while(xmlStreamReader.hasNext()) {
            xmlStreamReader.next();
            if (xmlStreamReader.isStartElement()) {
                QName qName =xmlStreamReader.getName();
                if (XOP_INCLUDE.equals(qName)) {
                    String hrefValue = xmlStreamReader.getAttributeValue("", "href");
                    if (hrefValue != null) {
                        dh =((OMAttachmentAccessor)xmlStreamReader).getDataHandler(hrefValue);
                    }
                }
            }
View Full Code Here

                }
            }
        }
       
        // The om tree was built by hand and is already complete
        OMXMLStreamReader reader = null;
        if ((builder == null) && done) {
            reader =  new OMStAXWrapper(null, this, false);
        } else {
            if ((builder == null) && !cache) {
                throw new UnsupportedOperationException(
View Full Code Here

                }
            }
        }
       
        // The om tree was built by hand and is already complete
        OMXMLStreamReader reader;
        boolean done = container.isComplete();
        if ((builder == null) && done) {
            reader = new OMStAXWrapper(null, container, false, configuration.isPreserveNamespaceContext());
        } else {
            if ((builder == null) && !cache) {
View Full Code Here

                }
            }
        }
       
        // The om tree was built by hand and is already complete
        OMXMLStreamReader reader = null;
        if ((builder == null) && done) {
            reader =  new OMStAXWrapper(null, this, false);
        } else {
            if ((builder == null) && !cache) {
                throw new UnsupportedOperationException(
View Full Code Here

       
        // Build tree
        root.build();
       
        // Use tree as input to XMLStreamReader
        OMXMLStreamReader xmlStreamReader = (OMXMLStreamReader) root.getXMLStreamReader();
       
        // Issue XOP:Include events for optimized MTOM text nodes
        xmlStreamReader.setInlineMTOM(false);
       
        DataHandler dh = null;
        while(xmlStreamReader.hasNext() && dh == null) {
            xmlStreamReader.next();
            if (xmlStreamReader.isStartElement()) {
                QName qName =xmlStreamReader.getName();
                if (XOP_INCLUDE.equals(qName)) {
                    String hrefValue = xmlStreamReader.getAttributeValue("", "href");
                    if (hrefValue != null) {
                        dh =((OMAttachmentAccessor)xmlStreamReader).getDataHandler(hrefValue);
                    }
                }
            }
        }
        assertTrue(dh != null);  
       
        // Make sure next event is an an XOP_Include END element
        xmlStreamReader.next();
        assertTrue(xmlStreamReader.isEndElement());
        assertTrue(XOP_INCLUDE.equals(xmlStreamReader.getName()));
       
        // Make sure the next event is the end tag of name
        xmlStreamReader.next();
        assertTrue(xmlStreamReader.isEndElement());
        assertTrue("name".equals(xmlStreamReader.getLocalName()));
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMXMLStreamReader

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.