Package org.apache.axiom.om.xpath

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


                                                              OMElement root) throws Exception {
        String[] nsPrefixes = wsdlPrefixes;
        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List<OMAttribute> omElements = (List<OMAttribute>) xpathExpression.selectNodes(root);
        if (omElements == null) {
            return Collections.emptyList();
        }
View Full Code Here


                                                      OMElement root) throws Exception {
        String[] nsPrefixes = wsdlPrefixes;
        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List nodeList = xpathExpression.selectNodes(root);
        List<String> values = new ArrayList<String>();
        if (nodeList != null) {
View Full Code Here

   */
  public static String parseGetBalanceResponse(OMElement result)
      throws Exception {

    AXIOMXPath xPath = new AXIOMXPath("//m:Balance");
    xPath.addNamespace("m", "urn:ebay:api:PayPalAPI");
    // xPath.add("m", "http://www.w3.org/2001/XMLSchema-instance");
    // xPath.addNamespace("xsi",
    // "http://www.w3.org/2001/XMLSchema-instance");
    OMElement last = (OMElement) xPath.selectSingleNode(result);
    if (last != null) {
View Full Code Here

    private String getPackageConfigValue(String key, OMElement packageNode) throws BillingException {
        String qualifiedKey = "ns:" + key.replaceAll("\\.", "/ns:");
        AXIOMXPath xpathExpression;
        try {
            xpathExpression = new AXIOMXPath(qualifiedKey);
            xpathExpression.addNamespace("ns", PACKAGE_DESCRIPTION_CONFIG_NS);
            List valueNodes = xpathExpression.selectNodes(packageNode);
            if (valueNodes.isEmpty()) {
                if (log.isDebugEnabled()) {
                    String msg = "No results found parsing package configuration for key: " +
                            qualifiedKey + ".";
View Full Code Here

        SOAPBody body = synCtx.getEnvelope().getBody();

        List symbolElementList = null;
        try {
            AXIOMXPath xPathSymbol = new AXIOMXPath("//ns1:USER/ns2:FirstName");
            xPathSymbol.addNamespace("ns1", "urn:sobject.enterprise.soap.sforce.com");
            xPathSymbol.addNamespace("ns2", "urn:sobject.enterprise.soap.sforce.com");
            symbolElementList = xPathSymbol.selectNodes(body);
            printFirstNames(symbolElementList);

        } catch (JaxenException e) {
View Full Code Here

        List symbolElementList = null;
        try {
            AXIOMXPath xPathSymbol = new AXIOMXPath("//ns1:USER/ns2:FirstName");
            xPathSymbol.addNamespace("ns1", "urn:sobject.enterprise.soap.sforce.com");
            xPathSymbol.addNamespace("ns2", "urn:sobject.enterprise.soap.sforce.com");
            symbolElementList = xPathSymbol.selectNodes(body);
            printFirstNames(symbolElementList);

        } catch (JaxenException e) {
            handleException("element symbol error", e, synCtx);
View Full Code Here

                                                           OMElement root) throws Exception {
        String[] nsPrefixes = wsdlPrefixes;
        AXIOMXPath xpathExpression = new AXIOMXPath(expression);

        for (int j = 0; j < nsPrefixes.length; j ++) {
            xpathExpression.addNamespace(nsPrefixes[j++], nsPrefixes[j]);
        }
        List<OMElement> omElements = (List<OMElement>) xpathExpression.selectNodes(root);
        if (omElements == null) {
            return Collections.emptyList();
        }
View Full Code Here

        if ((topic == null) || (topic.trim().length() == 0)) {
            try {
                AXIOMXPath topicXPath = new AXIOMXPath(
                        "s11:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME
                                + " | s12:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME);
                topicXPath.addNamespace("s11", "http://schemas.xmlsoap.org/soap/envelope/");
                topicXPath.addNamespace("s12", "http://www.w3.org/2003/05/soap-envelope");
                topicXPath.addNamespace("ns", EventingConstants.TOPIC_HEADER_NS);

                OMElement topicNode = (OMElement) topicXPath.selectSingleNode(mc.getEnvelope());
                if (topicNode != null) {
View Full Code Here

            try {
                AXIOMXPath topicXPath = new AXIOMXPath(
                        "s11:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME
                                + " | s12:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME);
                topicXPath.addNamespace("s11", "http://schemas.xmlsoap.org/soap/envelope/");
                topicXPath.addNamespace("s12", "http://www.w3.org/2003/05/soap-envelope");
                topicXPath.addNamespace("ns", EventingConstants.TOPIC_HEADER_NS);

                OMElement topicNode = (OMElement) topicXPath.selectSingleNode(mc.getEnvelope());
                if (topicNode != null) {
                    topic = topicNode.getText();
View Full Code Here

                AXIOMXPath topicXPath = new AXIOMXPath(
                        "s11:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME
                                + " | s12:Header/ns:" + EventingConstants.TOPIC_HEADER_NAME);
                topicXPath.addNamespace("s11", "http://schemas.xmlsoap.org/soap/envelope/");
                topicXPath.addNamespace("s12", "http://www.w3.org/2003/05/soap-envelope");
                topicXPath.addNamespace("ns", EventingConstants.TOPIC_HEADER_NS);

                OMElement topicNode = (OMElement) topicXPath.selectSingleNode(mc.getEnvelope());
                if (topicNode != null) {
                    topic = topicNode.getText();
                }
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.