Examples of addNamespace()


Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set source xpath condition to //symbol
        SynapseXPath source = new SynapseXPath("//wsx:symbol");
        source.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setSource(source);

        // set regex to IBM
        Pattern regex = Pattern.compile("IBM");
        filter.setRegex(regex);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set source xpath condition to //symbol
        SynapseXPath source = new SynapseXPath("//wsx:symbol");
        source.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setSource(source);

        // set regex to MSFT
        Pattern regex = Pattern.compile("MSFT");
        filter.setRegex(regex);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set source xpath condition to //symbol
        SynapseXPath source = new SynapseXPath("//wsx:symbol");
        source.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setSource(source);

        // set regex to MSFT
        Pattern regex = Pattern.compile("MSFT");
        filter.setRegex(regex);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new filter mediator
        FilterMediator filter = new FilterMediator();

        // set source xpath condition to //symbol
        SynapseXPath source = new SynapseXPath("//wsx:symbol");
        source.addNamespace("wsx", "http://www.webserviceX.NET/");
        filter.setSource(source);

        // set regex to MSFT
        Pattern regex = Pattern.compile("MSFT");
        filter.setRegex(regex);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new switch mediator
        switchMediator = new SwitchMediator();

        // set xpath condition to select symbol
        SynapseXPath xpath = new SynapseXPath("//wsx:symbol");
        xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
        switchMediator.setSource(xpath);
        SwitchCase caseOne = new SwitchCase();
        caseOne.setRegex(Pattern.compile("IBM"));
        AnonymousListMediator mediatorOne = new AnonymousListMediator();
        mediatorOne.addAll(Arrays.asList(new Mediator[] {ibmMediator}));
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        try {
            // get the 'pool' element and determine if we need to create a DataSource or
            // lookup using JNDI
            SynapseXPath xpath = new SynapseXPath("self::node()/syn:connection/syn:pool");
            xpath.addNamespace("syn", XMLConfigConstants.SYNAPSE_NAMESPACE);
            pool = (OMElement) xpath.selectSingleNode(elem);
            if (pool.getFirstChildWithName(DSNAME_Q) != null) {
                readLookupConfig(mediator, pool);
            } else if (pool.getFirstChildWithName(DRIVER_Q) != null) {
                readCustomDataSourceConfig(pool, mediator);
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

            "   </on-fail>" +
            "</validate>";

    private SynapseXPath createXPath(String expression) throws JaxenException {
        SynapseXPath xpath = new SynapseXPath(expression);
        xpath.addNamespace("m0", "http://services.samples/xsd");
        xpath.addNamespace("m1", "http://services.samples/xsd2");
        return xpath;
    }

    private void test(ValidateMediator validate, MessageContext synCtx, boolean expectFail) {
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

            "</validate>";

    private SynapseXPath createXPath(String expression) throws JaxenException {
        SynapseXPath xpath = new SynapseXPath(expression);
        xpath.addNamespace("m0", "http://services.samples/xsd");
        xpath.addNamespace("m1", "http://services.samples/xsd2");
        return xpath;
    }

    private void test(ValidateMediator validate, MessageContext synCtx, boolean expectFail) {
        final MutableInt onFailInvoked = new MutableInt();
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new XSLT mediator
        XSLTMediator transformMediator = new XSLTMediator();

        // set xpath condition to select source
        SynapseXPath xpath = new SynapseXPath("//m0:CheckPriceRequest");
        xpath.addNamespace("m0", "http://services.samples/xsd");
        transformMediator.setSource(xpath);

        // set XSLT transformation URL
        transformMediator.setXsltKey("xslt-key");
View Full Code Here

Examples of org.apache.synapse.util.xpath.SynapseXPath.addNamespace()

        // create a new switch mediator
        XSLTMediator transformMediator = new XSLTMediator();

        // set xpath condition to select source
        SynapseXPath xpath = new SynapseXPath("//m0:CheckPriceRequest");
        xpath.addNamespace("m0", "http://services.samples/xsd");
        transformMediator.setSource(xpath);

        // set XSLT transformation URL
        transformMediator.setXsltKey("xslt-key");
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.