Package org.apache.cxf.io

Examples of org.apache.cxf.io.StaxValidationManager


        }
    }
   
    private void setSchemaInMessage(Message message, XMLStreamReader reader) throws XMLStreamException  {
        if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message)) {
            StaxValidationManager mgr = bus.getExtension(StaxValidationManager.class);
            if (mgr != null) {
                mgr.setupValidation(reader, service);
            }
        }
    }
View Full Code Here


    }
   
    private void setSchemaInMessage(Message message, XMLStreamReader reader) throws XMLStreamException  {
        Object en = message.getContextualProperty(org.apache.cxf.message.Message.SCHEMA_VALIDATION_ENABLED);
        if (Boolean.TRUE.equals(en) || "true".equals(en)) {
            StaxValidationManager mgr = bus.getExtension(StaxValidationManager.class);
            if (mgr != null) {
                mgr.setupValidation(reader, service);
            }
        }
    }
View Full Code Here

        if (ds.getNode() instanceof Document) {
            rootElement = ((Document)ds.getNode()).getDocumentElement();
        } else {
            rootElement = (Element)ds.getNode();
        }
        StaxValidationManager svm = message.getExchange().getBus().getExtension(StaxValidationManager.class);
        if (svm != null) {
            //filter xop node
            XMLStreamReader reader = StaxUtils.createXMLStreamReader(ds);
            XMLStreamReader filteredReader =
                StaxUtils.createFilteredReader(reader,
                                               new StaxStreamFilter(new QName[] {XOP}));
           
            XMLStreamWriter nullWriter = StaxUtils.createXMLStreamWriter(new NUllOutputStream());
           
            svm.setupValidation(nullWriter, message.getExchange().getService().getServiceInfos().get(0));
            StaxUtils.copy(filteredReader, nullWriter);
        } else {
            //MSV not available, use a slower method of cloning the data, replace the xop's, validate
            LOG.fine("NO_MSV_AVAILABLE");
            if (DOMUtils.hasElementWithName(rootElement, "http://www.w3.org/2004/08/xop/include", "Include")) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.io.StaxValidationManager

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.