Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisModule


    private void engageSecurity(AxisService service) {
        String path = CarbonUtils.getCarbonConfigDirPath() + File.separator + WSD_SEC_POLICY_FILE;
        FileInputStream in = null;
        try {
            in = new FileInputStream(path);
            AxisModule module = service.getAxisConfiguration().getModule("rampart");
            if (module == null) {
                log.error("Rampart module is not available in the system. Unable to engage " +
                        "security on the WS-Discovery proxy.");
                return;
            }
View Full Code Here


        ConfigurationContext configContext = getConfigContext();
        AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
        CircularBuffer msgSeqBuff = getMessageSequenceBuffer();
        Object[] messageObjs;
        TracerServiceInfo tracerServiceInfo = new TracerServiceInfo();
        AxisModule axisModule = axisConfiguration.getModule(TracerConstants.WSO2_TRACER);

        if (axisModule == null) {
            throw new AxisFault(TracerConstants.WSO2_TRACER + " module is not available");
        }
        TracePersister tracePersister = getTracePersister();
View Full Code Here

            throw new RuntimeException("IllegalArgument for monitoring status :" + flag);
        }
        TracerServiceInfo tracerServiceInfo = new TracerServiceInfo();
        ConfigurationContext configurationContext = getConfigContext();
        AxisConfiguration axisConfiguration = configurationContext.getAxisConfiguration();
        AxisModule axisModule = axisConfiguration.getModule(TracerConstants.WSO2_TRACER);

        if (axisModule == null) {
            throw new RuntimeException(TracerAdmin.class.getName() + " " +
                                       TracerConstants.WSO2_TRACER + " is not available");
        }

        if (flag.equalsIgnoreCase("ON")) {
            if (!axisConfiguration.isEngaged(axisModule.getName())) {
                try {
                    axisConfiguration.engageModule(axisModule);
                } catch (AxisFault axisFault) {
                    log.error(axisFault);
                    throw new RuntimeException(axisFault);
                }
            }
        } else if (flag.equalsIgnoreCase("OFF")) {
            if (axisConfiguration.isEngaged(axisModule.getName())) {
                axisConfiguration.disengageModule(axisModule);
                configurationContext.removeProperty(TracerConstants.MSG_SEQ_BUFFER);
            }
        }
        TracePersister tracePersister = getTracePersister();
View Full Code Here

       
      String path = CarbonUtils.getCarbonConfigDirPath() + File.separator + WS_API_SEC_POLICY_FILE;
        FileInputStream in = null;
        try {
            in = new FileInputStream(path);
            AxisModule module = service.getAxisConfiguration().getModule("rampart");
            if (module == null) {
                log.error("Rampart module is not available in the system. Unable to engage " +
                        "security on the Registry WS-API Component");
                return;
            }
View Full Code Here

                    return param;
                }
            }
        }

        AxisModule module = baseConfig.getModule(moduleName);

        if (module != null) {
            param = module.getParameter(key);

            if (param != null) {
                return param;
            }
        }
View Full Code Here

            checkActivateWarning("isEngaged");
        }
        boolean isEngaged;
        if (configurationContext != null) {
            AxisConfiguration axisConfig = configurationContext.getAxisConfiguration();
            AxisModule module = axisConfig.getModule(moduleName);
            if (module == null) {
                return false;
            }
            isEngaged = axisConfig.isEngaged(module);
            if (isEngaged) {
View Full Code Here

     *
     * @param moduleref name of module to engage
     * @throws AxisFault
     */
    public void engageModule(String moduleref) throws AxisFault {
        AxisModule module = getModule(moduleref);
        if (module != null) {
            engageModule(module);
        } else {
            throw new AxisFault(Messages.getMessage("modulenotavailble", moduleref));
        }
View Full Code Here

     * @throws AxisFault
     */
    public void engageModule(String moduleName, String versionID)
            throws AxisFault {
        String actualName = Utils.getModuleName(moduleName, versionID);
        AxisModule module = getModule(actualName);
        if (module != null) {
            engageModule(module);
        } else {
            // TODO : Should this be an NPE or InvalidArgumentException?
            throw new AxisFault(Messages.getMessage("refertoinvalidmodule"));
View Full Code Here

     *
     * @param name module name to look up
     * @return an AxisModule if found, or null
     */
    public AxisModule getModule(String name) {
        AxisModule module = allModules.get(name);
        if (module != null) {
            return module;
        }
        // checks whether the version string seperator is not there in the
        // module name
View Full Code Here

    public boolean isEngaged(QName qname) {
        return isEngaged(qname.getLocalPart());
    }

    public boolean isEngaged(String moduleId) {
        AxisModule module = getModule(moduleId);
        if (module == null) {
            return false;
        }
        boolean isEngaged = super.isEngaged(module);
        if (!isEngaged) {
            AxisModule defaultModule = getDefaultModule(moduleId);
            isEngaged = engagedModules != null && engagedModules.values().contains(defaultModule);
        }
        return isEngaged;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisModule

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.