Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addAttribute()


                            type = "STRING";
                        } else {
                            handleException("Unknown Type " + varibelType);
                        }
                        if (type != null) {
                            customElement.addAttribute(fac.createOMAttribute(
                                    "type", nullNS, type));

                        }
                        xquery.addChild(customElement);
                    }
View Full Code Here


        LogMediator mediator = (LogMediator) m;
        OMElement log = fac.createOMElement("log", synNS);
        saveTracingState(log,mediator);

        if (mediator.getLogLevel() != LogMediator.SIMPLE) {
            log.addAttribute(fac.createOMAttribute(
                "level", nullNS,
                    mediator.getLogLevel() == LogMediator.HEADERS ? "headers" :
                    mediator.getLogLevel() == LogMediator.FULL ? "full" :
                    mediator.getLogLevel() == LogMediator.CUSTOM ? "custom" : "simple"
                ));
View Full Code Here

                    mediator.getLogLevel() == LogMediator.CUSTOM ? "custom" : "simple"
                ));
        }

        if (mediator.getCategory() != LogMediator.CATEGORY_INFO) {
            log.addAttribute(fac.createOMAttribute(
                "category", nullNS,
                    mediator.getCategory() == LogMediator.CATEGORY_TRACE ?
                            LogMediatorFactory.CAT_TRACE :
                    mediator.getCategory() == LogMediator.CATEGORY_DEBUG ?
                            LogMediatorFactory.CAT_DEBUG :
View Full Code Here

                            LogMediatorFactory.CAT_INFO
                ));
        }

        if (!LogMediator.DEFAULT_SEP.equals(mediator.getSeparator())) {
            log.addAttribute(fac.createOMAttribute(
                    "separator", nullNS, mediator.getSeparator()));
        }

        super.serializeProperties(log, mediator.getProperties());
View Full Code Here

        OMElement loadbalanceElement
                = fac.createOMElement("loadbalance", SynapseConstants.SYNAPSE_OMNAMESPACE);
        endpointElement.addChild(loadbalanceElement);

        loadbalanceElement.addAttribute(XMLConfigConstants.LOADBALANCE_ALGORITHM,
                                        loadbalanceEndpoint.getAlgorithm().getClass().getName(),
                                        null);

        // set if failover is turned off in the endpoint
        if (!loadbalanceEndpoint.isFailover()) {
View Full Code Here

                                        loadbalanceEndpoint.getAlgorithm().getClass().getName(),
                                        null);

        // set if failover is turned off in the endpoint
        if (!loadbalanceEndpoint.isFailover()) {
            loadbalanceElement.addAttribute("failover", "false", null);
        }

        // Serialize endpoint elements which are children of the loadbalance element
        if (loadbalanceEndpoint.getChildren() != null) {
            for (Endpoint childEndpoint : loadbalanceEndpoint.getChildren()) {
View Full Code Here

        } else {
            for (Member member : loadbalanceEndpoint.getMembers()) {
                OMElement memberEle = fac.createOMElement(
                        "member", SynapseConstants.SYNAPSE_OMNAMESPACE, loadbalanceElement);
                memberEle.addAttribute(fac.createOMAttribute(
                        "hostName", null, member.getHostName()));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpPort", null, String.valueOf(member.getHttpPort())));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpsPort", null, String.valueOf(member.getHttpsPort())));
View Full Code Here

            for (Member member : loadbalanceEndpoint.getMembers()) {
                OMElement memberEle = fac.createOMElement(
                        "member", SynapseConstants.SYNAPSE_OMNAMESPACE, loadbalanceElement);
                memberEle.addAttribute(fac.createOMAttribute(
                        "hostName", null, member.getHostName()));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpPort", null, String.valueOf(member.getHttpPort())));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpsPort", null, String.valueOf(member.getHttpsPort())));
                loadbalanceElement.addChild(memberEle);
            }
View Full Code Here

                        "member", SynapseConstants.SYNAPSE_OMNAMESPACE, loadbalanceElement);
                memberEle.addAttribute(fac.createOMAttribute(
                        "hostName", null, member.getHostName()));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpPort", null, String.valueOf(member.getHttpPort())));
                memberEle.addAttribute(fac.createOMAttribute(
                        "httpsPort", null, String.valueOf(member.getHttpsPort())));
                loadbalanceElement.addChild(memberEle);
            }
        }
        return endpointElement;
View Full Code Here

    public OMElement serializeEndpointDefinition(EndpointDefinition endpointDefinition) {

        OMElement element = fac.createOMElement("address", SynapseConstants.SYNAPSE_OMNAMESPACE);

        if (endpointDefinition.getAddress() != null) {
            element.addAttribute(
                    fac.createOMAttribute("uri", null, endpointDefinition.getAddress()));
        } else {
            handleException("Invalid Endpoint. Address is required");
        }
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.