Examples of AXIOMXPath


Examples of org.apache.axiom.om.xpath.AXIOMXPath

        }
       
        if (omPath == null){
          throw new SynapseException("Please specify the XPath to the base64 element");
        }else{
          AXIOMXPath xp;
      try {
        xp = new AXIOMXPath(omPath.getText());
        OMElementUtils.addNameSpaces(xp, elem, log);
       
        if(omNS != null){
          String prefix = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "prefix"));
          String name = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
          xp.addNamespace(prefix,name);   
        }
       
        mediator.setAttachmentPath(xp);
      } catch (JaxenException e) {
         log.error("Error creating XPath for Base64 element", e);
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        "//s12:Envelope/s12:Body/child::*[position()=1]";

    public ValidateMediator() {
        // create the default XPath
        try {
            this.source = new AXIOMXPath(DEFAULT_XPATH);
            this.source.addNamespace("s11", SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
            this.source.addNamespace("s12", SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        } catch (JaxenException e) {
            handleException("Error creating source XPath expression", e);
        }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        "//s12:Envelope/s12:Body/child::*[position()=1]";

    public XSLTMediator() {
        // create the default XPath
        try {
            this.source = new AXIOMXPath(DEFAULT_XPATH);
            this.source.addNamespace("s11", SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
            this.source.addNamespace("s12", SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
        } catch (JaxenException e) {
            handleException("Error creating source XPath expression", e);
        }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

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

        // set xpath condition to select symbol
        AXIOMXPath xpath = new AXIOMXPath("//wsx:symbol");
        xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
        switchMediator.setSource(xpath);

        // set ibm mediator to be called for IBM, msft for MSFT and default for others..
        switchMediator.addCase(new SwitchCaseMediator(Pattern.compile("IBM"), false,
            Arrays.asList(new Mediator[] {ibmMediator})));
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        MessageContext synCtx = TestUtils.getTestContext("<empty/>");
        propMediator.mediate(synCtx);

        assertTrue(
            "value".equals(Axis2MessageContext.getStringValue(
                new AXIOMXPath("synapse:get-property('name')"), synCtx)));
    }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        synCfg.addProperty("name", prop);
        synCtx.setConfiguration(synCfg);

        assertTrue(
            "value".equals(Axis2MessageContext.getStringValue(
                new AXIOMXPath("synapse:get-property('name')"), synCtx)));
    }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        MessageContext synCtx = TestUtils.getTestContext("<empty/>");
        propMediator.mediate(synCtx);

        // read property through a mediator property
        MediatorProperty medProp = new MediatorProperty();
        medProp.setExpression(new AXIOMXPath("synapse:get-property('name')"));

        assertTrue(
            "value".equals(medProp.getEvaluatedExpression(synCtx)));
    }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

        // process source XPath attribute if present
        OMAttribute attSource = elem.getAttribute(SOURCE_Q);

        if (attSource != null) {
            try {
                AXIOMXPath xp = new AXIOMXPath(attSource.getAttributeValue());
                validateMediator.setSource(xp);
                OMElementUtils.addNameSpaces(xp, elem, log);
            } catch (JaxenException e) {
                handleException("Invalid XPath expression specified for attribute 'source'", e);
            }
View Full Code Here

Examples of org.apache.axiom.om.xpath.AXIOMXPath

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

        // set xpath condition to select source
        AXIOMXPath xpath = new AXIOMXPath("//m0:CheckPriceRequest");
        xpath.addNamespace("m0", "http://www.apache-synapse.org/test");
        transformMediator.setSource(xpath);

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

Examples of org.apache.axiom.om.xpath.AXIOMXPath

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

        // set xpath condition to select source
        AXIOMXPath xpath = new AXIOMXPath("//m0:CheckPriceRequest");
        xpath.addNamespace("m0", "http://www.apache-synapse.org/test");
        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.