Package javax.xml.stream

Examples of javax.xml.stream.XMLStreamReader.nextTag()


            }
            xmlReader = StaxUtils.createXMLStreamReader(in);
        }

        try {
            if (xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT) {
                String ns = xmlReader.getNamespaceURI();
                if (ns == null || "".equals(ns)) {
                    throw new SoapFault(new Message("NO_NAMESPACE", LOG, xmlReader.getLocalName()),
                                        Soap11.getInstance().getVersionMismatch());
                }
View Full Code Here


                xmlReader = StaxUtils.createXMLStreamReader(bodySource);
            } else {
                StaxUtils.readDocElements(soapMessage.getSOAPBody(), xmlReader, true);
                DOMSource bodySource = new DOMSource(soapMessage.getSOAPPart().getEnvelope().getBody());
                xmlReader = StaxUtils.createXMLStreamReader(bodySource);
                xmlReader.nextTag();
                xmlReader.nextTag(); // move past body tag
            }
            message.setContent(XMLStreamReader.class, xmlReader);          
        } catch (SOAPException soape) {
            throw new SoapFault(new org.apache.cxf.common.i18n.Message(
View Full Code Here

            } else {
                StaxUtils.readDocElements(soapMessage.getSOAPBody(), xmlReader, true);
                DOMSource bodySource = new DOMSource(soapMessage.getSOAPPart().getEnvelope().getBody());
                xmlReader = StaxUtils.createXMLStreamReader(bodySource);
                xmlReader.nextTag();
                xmlReader.nextTag(); // move past body tag
            }
            message.setContent(XMLStreamReader.class, xmlReader);          
        } catch (SOAPException soape) {
            throw new SoapFault(new org.apache.cxf.common.i18n.Message(
                    "SOAPHANDLERINTERCEPTOR_EXCEPTION", BUNDLE), soape,
View Full Code Here

        try {
            XMLStreamReader reader;
            try {
                reader = inputFactory.createXMLStreamReader(is);
                try {
                    reader.nextTag();
                    QName name = reader.getName();
                    Object mo = read(reader);
                    if (type.isInstance(mo)) {
                        return type.cast(mo);
                    } else {
View Full Code Here

            e = reader.read(part, exDetail);
        } else {
            DataReader<XMLStreamReader> reader = dataBinding.createReader(XMLStreamReader.class);
            XMLStreamReader xsr = new W3CDOMStreamReader(exDetail);
            try {
                xsr.nextTag();
            } catch (XMLStreamException e1) {
                throw new Fault(e1);
            }
            reader.setProperty(DataReader.FAULT, fault);
            e = reader.read(part, xsr);
View Full Code Here

            StAXArtifactProcessor<ConfiguredNodeImplementation> configurationProcessor =
                artifactProcessors.getProcessor(ConfiguredNodeImplementation.class);
            URL configurationURL = new URL(configurationURI);
            InputStream is = configurationURL.openStream();
            XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
            reader.nextTag();
            ConfiguredNodeImplementation configuration = configurationProcessor.read(reader);
            is.close();

            // Resolve contribution URLs
            for (Contribution contribution : configuration.getContributions()) {
View Full Code Here

        XMLStreamReader xmlReader = null;
        try {
            StreamSource bodySource = new StreamSource(message
                    .getContent(InputStream.class));
            xmlReader = StaxUtils.createXMLStreamReader(bodySource);
            xmlReader.nextTag();
            xmlReader.nextTag();
            xmlReader.nextTag();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
View Full Code Here

        try {
            StreamSource bodySource = new StreamSource(message
                    .getContent(InputStream.class));
            xmlReader = StaxUtils.createXMLStreamReader(bodySource);
            xmlReader.nextTag();
            xmlReader.nextTag();
            xmlReader.nextTag();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
        return xmlReader;
View Full Code Here

            StreamSource bodySource = new StreamSource(message
                    .getContent(InputStream.class));
            xmlReader = StaxUtils.createXMLStreamReader(bodySource);
            xmlReader.nextTag();
            xmlReader.nextTag();
            xmlReader.nextTag();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
        return xmlReader;
    }
View Full Code Here

        os.close();             
        InputStream is = inMessage.getContent(InputStream.class);
        assertNotNull(is);
        XMLStreamReader reader = StaxUtils.createXMLStreamReader(is, null);
        assertNotNull(reader);
        reader.nextTag();
        
        String reponse = reader.getElementText();
        assertEquals("The reponse date should be equals", reponse, "TestHelloWorld");
    }
}
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.