Package org.apache.cxf.helpers

Examples of org.apache.cxf.helpers.MapNamespaceContext


                Map<String, String> namespaces = rp.getDeclaredNamespaces();
                XPathFactory factory = XPathFactory.newInstance();
                for (String expression : rp.getXPathExpressions()) {
                    XPath xpath = factory.newXPath();
                    if (namespaces != null) {
                        xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
                    }
                    NodeList list;
                    try {
                        list = (NodeList)xpath.evaluate(expression,
                                                                 header,
View Full Code Here


        if (xpaths != null && !xpaths.isEmpty()) {
            XPathFactory factory = XPathFactory.newInstance();
            for (String expression : xpaths) {
                XPath xpath = factory.newXPath();
                if (namespaces != null) {
                    xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
                }
              
                NodeList list = (NodeList)xpath.evaluate(expression, saaj.getSOAPPart().getEnvelope(),
                                               XPathConstants.NODESET);
                for (int x = 0; x < list.getLength(); x++) {
View Full Code Here

        if (xpaths != null && !xpaths.isEmpty()) {
            XPathFactory factory = XPathFactory.newInstance();
            for (String expression : xpaths) {
                XPath xpath = factory.newXPath();
                if (namespaces != null) {
                    xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
                }
              
                NodeList list = (NodeList)xpath.evaluate(expression, saaj.getSOAPPart().getEnvelope(),
                                               XPathConstants.NODESET);
                for (int x = 0; x < list.getLength(); x++) {
View Full Code Here

        // each request.
        final XPathFactory factory = XPathFactory.newInstance();
        final XPath xpath = factory.newXPath();
       
        if (namespaces != null) {
            xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
        }
       
        // For each XPath
        for (String xpathString : xPaths) {
            // Get the matching nodes
View Full Code Here

        // each request.
        final XPathFactory factory = XPathFactory.newInstance();
        final XPath xpath = factory.newXPath();

        if (this.prefixMap != null) {
            xpath.setNamespaceContext(new MapNamespaceContext(this.prefixMap));
        }

        for (XPathExpression xPathExpression : this.xPaths) {
            Collection<WSDataRef> refsToCheck = null;
View Full Code Here

        // each request.
        final XPathFactory factory = XPathFactory.newInstance();
        final XPath xpath = factory.newXPath();
       
        if (namespaces != null) {
            xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
        }
       
        // For each XPath
        for (String xpathString : Arrays.asList(xPath)) {
            // Get the matching nodes
View Full Code Here

        if (xpaths != null && !xpaths.isEmpty()) {
            XPathFactory factory = XPathFactory.newInstance();
            for (String expression : xpaths) {
                XPath xpath = factory.newXPath();
                if (namespaces != null) {
                    xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
                }
              
                NodeList list = (NodeList)xpath.evaluate(expression, saaj.getSOAPPart().getEnvelope(),
                                               XPathConstants.NODESET);
                for (int x = 0; x < list.getLength(); x++) {
View Full Code Here

            Document document = DOMUtils.createDocument();
            message.setContent(Node.class, document);
           
            XMLStreamWriter writer = new W3CDOMStreamWriter(document);
            try {
                MapNamespaceContext nsMap = new MapNamespaceContext();
                nsMap.addNamespace(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
                writer.setNamespaceContext(nsMap);
            } catch (XMLStreamException e) {
                e.printStackTrace();
                // ignore
            }
View Full Code Here

    public void addNamespace(String ns, String uri) {
        testUtilities.addNamespace(ns, uri);
    }
   
    public NamespaceContext getNamespaceContext() {
        return new MapNamespaceContext(testUtilities.getNamespaces());
    }
View Full Code Here

                    xpaths = p.getXPathExpressions();
                }
               
                if (xpaths != null) {
                    if (namespaces != null) {
                        xpath.setNamespaceContext(new MapNamespaceContext(namespaces));
                    }
                    try {
                        CryptoCoverageUtil.checkCoverage(soapEnvelope, refs,
                                xpath, xpaths, type, scope);
                    } catch (WSSecurityException e) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.helpers.MapNamespaceContext

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.