Package org.apache.axiom.om

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


                OMElement elseElem = fac.createOMElement("else", synNS);
                filter.addChild(elseElem);

                if (mediator.getElseKey() != null) {
                    elseElem.addAttribute(
                        fac.createOMAttribute("sequence", nullNS, mediator.getElseKey()));
                } else {
                    serializeChildren(elseElem, mediator.getElseMediator().getList());
                }
            }
View Full Code Here


        Dispatcher dispatcher = dynamicLoadbalanceEndpoint.getDispatcher();
        if (dispatcher != null) {

            OMElement sessionElement = fac.createOMElement("session", SynapseConstants.SYNAPSE_OMNAMESPACE);
            if (dispatcher instanceof SoapSessionDispatcher) {
                sessionElement.addAttribute("type", "soap", null);
            } else if (dispatcher instanceof HttpSessionDispatcher) {
                sessionElement.addAttribute("type", "http", null);
            } else if (dispatcher instanceof SimpleClientSessionDispatcher) {
                sessionElement.addAttribute("type", "simpleClientSession", null);
            } else {
View Full Code Here

            OMElement sessionElement = fac.createOMElement("session", SynapseConstants.SYNAPSE_OMNAMESPACE);
            if (dispatcher instanceof SoapSessionDispatcher) {
                sessionElement.addAttribute("type", "soap", null);
            } else if (dispatcher instanceof HttpSessionDispatcher) {
                sessionElement.addAttribute("type", "http", null);
            } else if (dispatcher instanceof SimpleClientSessionDispatcher) {
                sessionElement.addAttribute("type", "simpleClientSession", null);
            } else {
                handleException("invalid session dispatcher : " + dispatcher.getClass().getName());
            }
View Full Code Here

            if (dispatcher instanceof SoapSessionDispatcher) {
                sessionElement.addAttribute("type", "soap", null);
            } else if (dispatcher instanceof HttpSessionDispatcher) {
                sessionElement.addAttribute("type", "http", null);
            } else if (dispatcher instanceof SimpleClientSessionDispatcher) {
                sessionElement.addAttribute("type", "simpleClientSession", null);
            } else {
                handleException("invalid session dispatcher : " + dispatcher.getClass().getName());
            }

            long sessionTimeout = dynamicLoadbalanceEndpoint.getSessionTimeout();
View Full Code Here

                = fac.createOMElement("dynamicLoadbalance", SynapseConstants.SYNAPSE_OMNAMESPACE);
        endpointElement.addChild(dynamicLoadbalanceElement);

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

        LoadBalanceMembershipHandler loadBalanceMembershipHandler = dynamicLoadbalanceEndpoint.getLbMembershipHandler();

        dynamicLoadbalanceElement.addAttribute(XMLConfigConstants.LOADBALANCE_ALGORITHM,
View Full Code Here

            dynamicLoadbalanceElement.addAttribute("failover", "false", null);
        }

        LoadBalanceMembershipHandler loadBalanceMembershipHandler = dynamicLoadbalanceEndpoint.getLbMembershipHandler();

        dynamicLoadbalanceElement.addAttribute(XMLConfigConstants.LOADBALANCE_ALGORITHM,
                loadBalanceMembershipHandler.getLoadbalanceAlgorithm().getClass().getName(),
                null);

        OMElement membershipHandlerElement =
                fac.createOMElement("membershipHandler", SynapseConstants.SYNAPSE_OMNAMESPACE);
View Full Code Here

        OMElement membershipHandlerElement =
                fac.createOMElement("membershipHandler", SynapseConstants.SYNAPSE_OMNAMESPACE);
        dynamicLoadbalanceElement.addChild(membershipHandlerElement);

        membershipHandlerElement.addAttribute("class",loadBalanceMembershipHandler.getClass().getName(),null);

        Properties membershipHandlerProperties = loadBalanceMembershipHandler.getProperties();
        OMElement propertyElement;
        for (Object property : membershipHandlerProperties.keySet()){
            propertyElement = fac.createOMElement("property", SynapseConstants.SYNAPSE_OMNAMESPACE);
View Full Code Here

        Properties membershipHandlerProperties = loadBalanceMembershipHandler.getProperties();
        OMElement propertyElement;
        for (Object property : membershipHandlerProperties.keySet()){
            propertyElement = fac.createOMElement("property", SynapseConstants.SYNAPSE_OMNAMESPACE);
            membershipHandlerElement.addChild(propertyElement);
            propertyElement.addAttribute("name", property.toString(), null);
            propertyElement.addAttribute("value", membershipHandlerProperties.getProperty((String)property), null);
        }

        return endpointElement;
    }
View Full Code Here

        OMElement propertyElement;
        for (Object property : membershipHandlerProperties.keySet()){
            propertyElement = fac.createOMElement("property", SynapseConstants.SYNAPSE_OMNAMESPACE);
            membershipHandlerElement.addChild(propertyElement);
            propertyElement.addAttribute("name", property.toString(), null);
            propertyElement.addAttribute("value", membershipHandlerProperties.getProperty((String)property), null);
        }

        return endpointElement;
    }
}
View Full Code Here

    public static void serializeMediatorProperty(OMElement parent,
                                             MediatorProperty mp,
                                             QName childElementName) {
        OMElement prop = fac.createOMElement(childElementName, parent);
        if (mp.getName() != null) {
            prop.addAttribute(fac.createOMAttribute("name", nullNS, mp.getName()));
        } else {
            String msg = "Mediator property name missing";
            log.error(msg);
            throw new SynapseException(msg);
        }
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.