Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisConfiguration


     *             this AxisDescription instance successfully or no module to
     *             execute some portion (one or more PrimtiveAssertions ) of
     *             that effective policy.
     */
    public void applyPolicy(Policy policy) throws AxisFault {
        AxisConfiguration configuration = getAxisConfiguration();

        if (configuration == null) {
            // FIXME return or throw an Exception?
            return;
        }

        // sets AxisDescription policy
        getPolicyInclude().setPolicy(policy);

        /*
         * now we should take the effective one .. it is necessary since
         * AxisDescription.applyPolicy(..) doesn't override policies at the
         * Upper levels.
         */
        Policy effPolicy = getPolicyInclude().getEffectivePolicy();

        /*
         * for the moment we consider policies with only one alternative. If the
         * policy contains multiple alternatives only the first alternative will
         * be considered.
         */
        Iterator iterator = effPolicy.getAlternatives();
        if (!iterator.hasNext()) {
            throw new AxisFault(
                    "Policy doesn't contain any policy alternatives");
        }

        List assertionList = (List) iterator.next();

        Assertion assertion;
        String namespaceURI;

        List moduleList;

        List namespaceList = new ArrayList();
        List modulesToEngage = new ArrayList();

        for (Iterator assertions = assertionList.iterator(); assertions
                .hasNext();) {
            assertion = (Assertion) assertions.next();
            namespaceURI = assertion.getName().getNamespaceURI();

            moduleList = configuration
                    .getModulesForPolicyNamesapce(namespaceURI);

            if (moduleList == null) {
                log.debug("can't find any module to process "
                        + assertion.getName() + " type assertions");
View Full Code Here


       
        if (this instanceof AxisMessage) {
            return;
        }

        AxisConfiguration configuration = getAxisConfiguration();
        if (configuration == null) {
            return; // CHECKME: May be we need to throw an Exception ??
        }

        Policy effPolicy = getPolicyInclude().getEffectivePolicy();

        if (effPolicy != null) {

            /*
             * for the moment we consider policies with only one alternative. If
             * the policy contains multiple alternatives only the first
             * alternative will be considered.
             */
            Iterator iterator = effPolicy.getAlternatives();
            if (!iterator.hasNext()) {
                throw new AxisFault(
                        "Policy doesn't contain any policy alternatives");
            }

            List assertionList = (List) iterator.next();

            Assertion assertion;
            String namespaceURI;

            List moduleList;

            List namespaceList = new ArrayList();
            List modulesToEngage = new ArrayList();

            for (Iterator assertions = assertionList.iterator(); assertions
                    .hasNext();) {
                assertion = (Assertion) assertions.next();
                namespaceURI = assertion.getName().getNamespaceURI();

                moduleList = configuration
                        .getModulesForPolicyNamesapce(namespaceURI);

                if (moduleList == null) {
                    log.debug("can't find any module to process "
                            + assertion.getName() + " type assertions");
View Full Code Here

    public void disengageModule(AxisModule module) {
        if (module != null) {
            if (getParent() != null) {
                AxisService service = (AxisService) getParent();
                AxisConfiguration axiConfiguration = service.getAxisConfiguration();
                PhaseResolver phaseResolver = new PhaseResolver(axiConfiguration);
                if (service.isEngaged(module.getName())) {
                    phaseResolver.disengageModuleFromOperationChain(module, this);
                } else if (axiConfiguration != null &&
                        axiConfiguration.isEngaged(module.getName())) {
                    phaseResolver.disengageModuleFromOperationChain(module, this);
                } else {
                    if (axiConfiguration != null) {
                        phaseResolver.disengageModuleFromGlobalChains(module);
                    }
View Full Code Here

        }
        return proxyService;
    }

    public void start(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration();
        axisConfig.getServiceForActivation(this.getName()).setActive(true);
        this.setRunning(true);
    }
View Full Code Here

        axisConfig.getServiceForActivation(this.getName()).setActive(true);
        this.setRunning(true);
    }

    public void stop(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration().getAxisConfiguration();
        try {
            axisConfig.getService(this.getName()).setActive(false);
            this.setRunning(false);
        } catch (AxisFault axisFault) {
            handleException(axisFault.getMessage());
        }
    }
View Full Code Here

        return new Axis2MessageContext(axisMsgCtx, synCfg, synEnv);
    }

    private static SynapseConfiguration getSynapseConfigFromAxisConfig(
            org.apache.axis2.context.MessageContext mc) {
        AxisConfiguration ac =
                mc.getConfigurationContext().getAxisConfiguration();
        Parameter synConfigParam = ac.getParameter(SYNAPSE_CONFIG);
        if (synConfigParam != null) {
            return (SynapseConfiguration) synConfigParam.getValue();
        }
        return null;
    }
View Full Code Here

        return null;
    }

    private static SynapseEnvironment getSynapseEnvironment(
            org.apache.axis2.context.MessageContext mc) {
        AxisConfiguration ac =
                mc.getConfigurationContext().getAxisConfiguration();
        Parameter synEnvParam = ac.getParameter(SYNAPSE_ENV);
        if (synEnvParam != null) {
            return (SynapseEnvironment) synEnvParam.getValue();
        }
        return null;
    }
View Full Code Here

        }
        return proxyService;
    }

    public void start(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration();
        axisConfig.getServiceForActivation(this.getName()).setActive(true);
        this.setRunning(true);
    }
View Full Code Here

        axisConfig.getServiceForActivation(this.getName()).setActive(true);
        this.setRunning(true);
    }

    public void stop(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration().getAxisConfiguration();
        try {
            axisConfig.getService(this.getName()).setActive(false);
            this.setRunning(false);
        } catch (AxisFault axisFault) {
            handleException(axisFault.getMessage());
        }
    }
View Full Code Here

        if (wsAddressingEnabled) {
            axisOutMsgCtx.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.FALSE);
        }

        ConfigurationContext axisCfgCtx = axisOutMsgCtx.getConfigurationContext();
        AxisConfiguration axisCfg       = axisCfgCtx.getAxisConfiguration();

        AxisService anoymousService =
            AnonymousServiceFactory.getAnonymousService(
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        ServiceGroupContext sgc = new ServiceGroupContext(
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.AxisConfiguration

Copyright © 2018 www.massapicom. 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.