Examples of createOMElement()


Examples of org.apache.axiom.om.OMFactory.createOMElement()

        MessageContext mc = new TestMessageContextBuilder()
            .addEntry("xslt-key", getClass().getResource("cdata.xslt"))
            .build();
       
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement in = factory.createOMElement(new QName(null, "in"));
        factory.createOMText(in, "test", OMNode.CDATA_SECTION_NODE);
        mc.getEnvelope().getBody().addChild(in);
       
        transformMediator.mediate(mc);
       
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

        MessageContext mc = new TestMessageContextBuilder()
            .addEntry("xslt-key", XSLTMediator.class.getResource("identity.xslt"))
            .build();
       
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement orgRoot = factory.createOMElement(new QName("root"));
        OMElement orgElement = factory.createOMElement(new QName("urn:mynamespace", "element1"));
        orgElement.setText("test");
        OMAttribute orgAttribute = orgElement.addAttribute("att", "testValue", null);
        orgRoot.addChild(orgElement);
       
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

            .addEntry("xslt-key", XSLTMediator.class.getResource("identity.xslt"))
            .build();
       
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement orgRoot = factory.createOMElement(new QName("root"));
        OMElement orgElement = factory.createOMElement(new QName("urn:mynamespace", "element1"));
        orgElement.setText("test");
        OMAttribute orgAttribute = orgElement.addAttribute("att", "testValue", null);
        orgRoot.addChild(orgElement);
       
        mc.getEnvelope().getBody().addChild(orgRoot);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

            log.debug("Serializing Synapse configuration to the file system");
        }

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace synNS = fac.createOMNamespace(XMLConfigConstants.SYNAPSE_NAMESPACE, "syn");
        OMElement definitions = fac.createOMElement("definitions", synNS);

        try {
            currentDirectory = createTempDirectoryStructure();

            if (synapseConfig.getRegistry() != null) {
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

     * @throws Exception on file I/O error
     */
    public void serializeSynapseXML(SynapseConfiguration synapseConfig) throws Exception {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace synNS = fac.createOMNamespace(XMLConfigConstants.SYNAPSE_NAMESPACE, "syn");
        OMElement definitions = fac.createOMElement("definitions", synNS);

        if (synapseConfig.getRegistry() != null && !Boolean.valueOf(synapseConfig.getProperty(
                MultiXMLConfigurationBuilder.SEPARATE_REGISTRY_DEFINITION))) {
            RegistrySerializer.serializeRegistry(definitions, synapseConfig.getRegistry());
        }
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace nullNS = fac.createOMNamespace(XMLConfigConstants.NULL_NAMESPACE, "");

        OMElement evenSourceElem =
                fac.createOMElement("eventSource", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
        if (eventSource.getName() != null) {
            evenSourceElem
                    .addAttribute(fac.createOMAttribute("name", nullNS, eventSource.getName()));
        }
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

            evenSourceElem
                    .addAttribute(fac.createOMAttribute("name", nullNS, eventSource.getName()));
        }

        if (eventSource.getSubscriptionManager() != null) {
            OMElement subManagerElem = fac.createOMElement("subscriptionManager",
                    XMLConfigConstants.SYNAPSE_OMNAMESPACE);
            subManagerElem.addAttribute(fac.createOMAttribute("class", nullNS,
                    eventSource.getSubscriptionManager().getClass().getName()));
            Collection<String> names =
                    (Collection<String>) eventSource.getSubscriptionManager().getPropertyNames();
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

                    value = eventSource.getConfigurationProperty(name);
                } else {
                    value = eventSource.getSubscriptionManager().getPropertyValue(name);
                }
                OMElement propElem =
                        fac.createOMElement("property", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                propElem.addAttribute(fac.createOMAttribute("name", nullNS, name));
                propElem.addAttribute(fac.createOMAttribute("value", nullNS, value));
                subManagerElem.addChild(propElem);
            }
            evenSourceElem.addChild(subManagerElem);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

                    eventSource.getSubscriptionManager().getStaticSubscriptions();
            for (Iterator<Subscription> iterator = staticSubscriptionList.iterator();
                 iterator.hasNext();) {
                Subscription staticSubscription = iterator.next();
                OMElement staticSubElem =
                        fac.createOMElement("subscription", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                staticSubElem.addAttribute(
                        fac.createOMAttribute("id", nullNS, staticSubscription.getId()));
                OMElement filterElem =
                        fac.createOMElement("filter", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                filterElem.addAttribute(fac.createOMAttribute("source", nullNS,
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMElement()

                OMElement staticSubElem =
                        fac.createOMElement("subscription", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                staticSubElem.addAttribute(
                        fac.createOMAttribute("id", nullNS, staticSubscription.getId()));
                OMElement filterElem =
                        fac.createOMElement("filter", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                filterElem.addAttribute(fac.createOMAttribute("source", nullNS,
                        (String) staticSubscription.getFilterValue()));
                filterElem.addAttribute(fac.createOMAttribute("dialect", nullNS,
                        (String) staticSubscription.getFilterDialect()));
                staticSubElem.addChild(filterElem);
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.