Examples of addNamespaces()


Examples of net.sourceforge.retroweaver.RetroWeaver.addNameSpaces()

    // Name space conversion
    List<NameSpace> l = new ArrayList<NameSpace>();
    for(Namespace n: namespaces) {
      l.add(new NameSpace(n.getFrom(), n.getTo()));
    }
    weaver.addNameSpaces(l);

    //  Set up a listener.
    weaver.setListener(new WeaveListener() {
      public void weavingStarted(String msg) {
        getProject().log(RetroWeaverTask.this, msg, Project.MSG_INFO);
View Full Code Here

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

            AXIOMXPath xpath = new AXIOMXPath(xpathString);
            // here if user has given prefix namespace mappings
            // we use it. otherwise get from the om element existing
            // mappings
            if ((namespacePrefixes == null) || namespacePrefixes.isEmpty()) {
                xpath.addNamespaces(eventOMElement);
            } else {
                for(XpathDefinition xpathDefinition : namespacePrefixes){
                    xpath.addNamespace(xpathDefinition.getPrefix(),xpathDefinition.getNamespace());
                }
               /* for (String prefix : namespacePrefixes.keySet()) {
View Full Code Here

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

     */
    private AXIOMXPath createAxiomXPath(OMElement source, String xpath) {
        try {

            AXIOMXPath axiomxPath = new AXIOMXPath(xpath);
            axiomxPath.addNamespaces(source);
            return axiomxPath;
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error creating XPath " + xpath, log);
        }
    }
View Full Code Here

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

            return null;
        }
        try {
            AXIOMXPath axiomxPath = new AXIOMXPath(xpath);
            OMElement xml = (OMElement) messageInterceptor.extractEnvelope(message).getValue();
            axiomxPath.addNamespaces(xml);
            return XPathHelper.evaluate(xml, axiomxPath);
        } catch (JaxenException e) {
            throw new LoggedRuntimeException("Error creating XPath " + xpath, log);
        }
    }
View Full Code Here

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

        OMElement root1 = AXIOMUtil.stringToOM(
                "<ns1:root xmlns:ns1='urn:ns1'><ns1:child xmlns:ns2='urn:ns2'/></root>");
        OMElement root2 = AXIOMUtil.stringToOM(
                "<root xmlns='urn:ns1'><child xmlns='urn:ns2'>text</child></root>");
        AXIOMXPath xpath = new AXIOMXPath("/ns1:root/ns2:child");
        xpath.addNamespaces(root1.getFirstElement());
        assertEquals("text", xpath.stringValueOf(root2.getParent()));
    }

    public void testAddNamespaces2() throws Exception {
        OMElement root1 = AXIOMUtil.stringToOM(
View Full Code Here

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

        OMElement root1 = AXIOMUtil.stringToOM(
                "<ns:root xmlns:ns='urn:ns1'><ns:child xmlns:ns='urn:ns2'/></root>");
        OMElement root2 = AXIOMUtil.stringToOM(
                "<root xmlns='urn:ns1'><child xmlns='urn:ns2'>text</child></root>");
        AXIOMXPath xpath = new AXIOMXPath("//ns:child");
        xpath.addNamespaces(root1.getFirstElement());
        assertEquals("text", xpath.stringValueOf(root2.getParent()));
    }
}
View Full Code Here

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

        OMElement root1 = AXIOMUtil.stringToOM(factory,
                "<ns1:root xmlns:ns1='urn:ns1'><ns1:child xmlns:ns2='urn:ns2'/></root>");
        OMElement root2 = AXIOMUtil.stringToOM(factory,
                "<root xmlns='urn:ns1'><child xmlns='urn:ns2'>text</child></root>");
        AXIOMXPath xpath = new AXIOMXPath("/ns1:root/ns2:child");
        xpath.addNamespaces(root1.getFirstElement());
        assertEquals("text", xpath.stringValueOf(root2.getParent()));
    }
}
View Full Code Here

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

        OMElement root1 = AXIOMUtil.stringToOM(factory,
                "<ns:root xmlns:ns='urn:ns1'><ns:child xmlns:ns='urn:ns2'/></root>");
        OMElement root2 = AXIOMUtil.stringToOM(factory,
                "<root xmlns='urn:ns1'><child xmlns='urn:ns2'>text</child></root>");
        AXIOMXPath xpath = new AXIOMXPath("//ns:child");
        xpath.addNamespaces(root1.getFirstElement());
        assertEquals("text", xpath.stringValueOf(root2.getParent()));
    }
}
View Full Code Here

Examples of org.apache.rampart.policy.model.OptimizePartsConfig.addNamespaces()

      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String namespace = elem.getText();
        String prefix = elem.getAttributeValue(new QName("", OptimizePartsConfig.PREFIX_ATTR));
        String uri = elem.getAttributeValue(new QName("", OptimizePartsConfig.URI_ATTR));
        assertion.addNamespaces(prefix, uri);
      }
     
    }
    return assertion;
  }
View Full Code Here

Examples of org.apache.rampart.policy.model.OptimizePartsConfig.addNamespaces()

      while(iterator.hasNext()){
        OMElement elem = (OMElement)iterator.next();
        String namespace = elem.getText();
        String prefix = elem.getAttributeValue(new QName("", OptimizePartsConfig.PREFIX_ATTR));
        String uri = elem.getAttributeValue(new QName("", OptimizePartsConfig.URI_ATTR));
        assertion.addNamespaces(prefix, uri);
      }
     
    }
    return assertion;
  }
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.