Examples of FragmentStreamReader


Examples of org.apache.cxf.staxutils.FragmentStreamReader

        if (message != null) {
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        close();
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

    public Object readObject(MessageReader mreader, Context context) throws DatabindingException {
        try {
            XMLStreamReader reader = ((ElementReader)mreader).getXMLStreamReader();
            // we need to eat the surrounding element.
            reader.nextTag();
            Object tree = StaxUtils.read(null, new FragmentStreamReader(reader), true);
            reader.nextTag(); // eat the end tag.
            return tree;
        } catch (XMLStreamException e) {
            throw new DatabindingException("Could not parse xml.", e);
        }
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        if (message != null) {
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        closed = true;
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        Map<String, String> ns = new HashMap<String, String>();
        ns.put("s", Soap12.SOAP_NAMESPACE);
        XPathUtils xu = new XPathUtils(ns);       
       
        try {
            Document fault = StaxUtils.read(new FragmentStreamReader(reader));
            String faultCodeString = (String) xu.getValue("//s:Fault/s:Code/s:Value/text()",
                                                        fault,
                                                        XPathConstants.STRING);
           
            faultCode = XMLUtils.getQName(faultCodeString, fault);
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

                } else if (reader.getLocalName().equals("faultstring")) {
                    exMessage = reader.getElementText();
                } else if (reader.getLocalName().equals("faultactor")) {
                    role = reader.getElementText();
                } else if (reader.getLocalName().equals("detail")) {
                    detail = StaxUtils.read(new FragmentStreamReader(reader)).getDocumentElement();
                }
            }
        } catch (XMLStreamException e) {
            throw new SoapFault("Could not parse message.",
                                message.getVersion().getSender());
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

            String exMessage = reader.getElementText();
            Fault fault = new XMLFault(exMessage);
            reader.nextTag();
            if (StaxUtils.toNextElement(reader)) {
                // handling detail
                Element detail = StaxUtils.read(new FragmentStreamReader(reader)).getDocumentElement();
                fault.setDetail(detail);
            }
            message.setContent(Exception.class, fault);
        } catch (XMLStreamException xse) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", BUNDLE));
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        if (message != null) {
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        closed = true;
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        }
    }
   
    public static class CopyService {
        public XMLStreamReader invoke(final XMLStreamReader reader) {
            return new FragmentStreamReader(reader);
        }
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

           
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        close();
View Full Code Here

Examples of org.apache.cxf.staxutils.FragmentStreamReader

        if (message != null) {
            message.removeContent(XMLStreamReader.class);
            final InputStream ins = message.getContent(InputStream.class);
            message.removeContent(InputStream.class);
           
            input = new FragmentStreamReader(input, true) {
                boolean closed;
                public boolean hasNext() throws XMLStreamException {
                    boolean b = super.hasNext();
                    if (!b && !closed) {
                        close();
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.