Package org.apache.cxf.staxutils

Examples of org.apache.cxf.staxutils.W3CDOMStreamReader


    }

    /** {@inheritDoc}*/
    public Object read(QName name, Element input, Class type) {
        try {
            W3CDOMStreamReader sreader = new W3CDOMStreamReader(input);
            sreader.nextTag(); //advance into the first tag
            return reader.read(name, sreader, type);
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here


    }

    /** {@inheritDoc}*/
    public Object read(Element input) {
        try {
            W3CDOMStreamReader sreader = new W3CDOMStreamReader(input);
            sreader.nextTag(); //advance into the first tag
            return reader.read(sreader);
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

                if (param.getDataBinding() == null) {
                    Node source = (Node)param.getObject();
                    if (supportsNode) {
                        object = getNodeDataReader(message).read(mpi, source);
                    } else {
                        W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
                        try {
                            reader.nextTag(); //advance into the first tag
                        } catch (XMLStreamException e) {
                            //ignore
                        }
                        object = getDataReader(message, XMLStreamReader.class).read(mpi, reader);
                    }
View Full Code Here

                }
            } catch (Exception e) {
                throw new Fault(e);
            }
        } else if (SAXSource.class.isAssignableFrom(type)) {
            o = new StaxSource(new W3CDOMStreamReader(m.getSOAPPart()));
        } else if (Source.class.isAssignableFrom(type)) {
            o = new DOMSource(m.getSOAPPart());
        }
        list.set(0, o);
    }
View Full Code Here

                                               "UTF-8"));
        } catch (Exception ex) {
            throwFault("Payload document can not be created", ex);
        }
        message.setContent(XMLStreamReader.class,
                           new W3CDOMStreamReader(payloadDoc));
        message.setContent(InputStream.class, null);
    }
View Full Code Here

                                               soapVersion.getAttrNameRole());
                        }
                        if (supportsNode) {
                            object = getNodeDataReader(message).read(mpi, source);
                        } else {
                            W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
                            try {
                                reader.nextTag(); //advance into the first tag
                            } catch (XMLStreamException e) {
                                //ignore
                            }
                            object = getDataReader(message, XMLStreamReader.class).read(mpi, reader);
                        }
View Full Code Here

        try {
            Node mainNode = message.getContent(Node.class);
            Node fault = null;
           
            if (reader instanceof W3CDOMStreamReader) {
                W3CDOMStreamReader dr = (W3CDOMStreamReader)reader;
                fault = dr.getCurrentElement();
                dr.consumeFrame();
            } else if (mainNode != null) {
                Node bodyNode = (Node) xu.getValue("//s:Body",
                                                   mainNode,
                                                   XPathConstants.NODE);
View Full Code Here

                XMLStreamWriter writer = (XMLStreamWriter)message.get(ORIGINAL_XML_WRITER);
                message.remove(ORIGINAL_XML_WRITER);

                try {
                    if (writer != null) {
                        StaxUtils.copy(new W3CDOMStreamReader(soapMessage.getSOAPPart()), writer);
                        writer.flush();
                        message.setContent(XMLStreamWriter.class, writer);
                    }
                } catch (XMLStreamException e) {
                    if (e.getCause() instanceof ConnectException) {
View Full Code Here

                newDoc.adoptNode(actualBody);
                root = actualBody;
            }
        }
        message.setContent(XMLStreamReader.class,
                           new W3CDOMStreamReader(root));
        message.setContent(InputStream.class, null);
       
    }
View Full Code Here

        validateToken(message, samlElement);
       
        doc.getDocumentElement().removeChild(samlElement);
        if (bodyIsRoot) {
            message.setContent(XMLStreamReader.class,
                               new W3CDOMStreamReader(doc));
            message.setContent(InputStream.class, null);
        } else {
            Element actualBody = getActualBody(doc.getDocumentElement());
            if (actualBody != null) {
                Document newDoc = DOMUtils.createDocument();
                newDoc.adoptNode(actualBody);
                message.setContent(XMLStreamReader.class,
                        new W3CDOMStreamReader(actualBody));
                message.setContent(InputStream.class, null);
            }
        }
       
        return null;
View Full Code Here

TOP

Related Classes of org.apache.cxf.staxutils.W3CDOMStreamReader

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.