Package org.apache.axiom.om.xpath

Examples of org.apache.axiom.om.xpath.AXIOMXPath.evaluate()


                // this should not cause a runtime exception!
            }
        }

        try {
            Object o = sourceXPath.evaluate(synCtx.getEnvelope());
            if (o instanceof OMNode) {
                return (OMNode) o;
            } else if (o instanceof List && !((List) o).isEmpty()) {
                return (OMNode) ((List) o).get(0)// Always fetches *only* the first
            } else {
View Full Code Here


            } catch (JaxenException e) {}
        }

        try {
            log.debug("Transformation against source element evaluated by : " + sourceXPath);
            Object o = sourceXPath.evaluate(synCtx.getEnvelope());
            if (o instanceof OMNode) {
                return (OMNode) o;
            } else if (o instanceof List && !((List) o).isEmpty()) {
                return (OMNode) ((List) o).get(0)// Always fetches *only* the first
            } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            OMElement res = new StAXOMBuilder(reader).getDocumentElement();
            if (res != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(res);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals(KOREAN_TEXT, ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals(KOREAN_TEXT, ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            OMElement res = new StAXOMBuilder(reader).getDocumentElement();
            if (res != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(res);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
View Full Code Here

            XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader((String) reply));
            SOAPEnvelope env = new StAXSOAPModelBuilder(reader).getSOAPEnvelope();
            if (env != null) {
                AXIOMXPath xpath = new AXIOMXPath("//my:myValue");
                xpath.addNamespace("my", "http://localhost/axis2/services/EchoXMLService");
                Object result = xpath.evaluate(env);
                if (result != null && result instanceof OMElement) {
                    assertEquals("omTextValue", ((OMElement) result).getText());
                }
            }
        } else {
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.