Package org.apache.axis2.description

Examples of org.apache.axis2.description.ModuleConfiguration


     * @return Parameter <code>Parameter</code>
     */
    public Parameter getModuleParameter(String key, String moduleName,
                                        HandlerDescription handler) {
        Parameter param;
        ModuleConfiguration moduleConfig;

        AxisOperation opDesc = getAxisOperation();

        if (opDesc != null) {

            moduleConfig = opDesc.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = opDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisService axisService = getAxisService();

        if (axisService != null) {

            moduleConfig = axisService.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = axisService.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisServiceGroup axisServiceDesc = getAxisServiceGroup();

        if (axisServiceDesc != null) {

            moduleConfig = axisServiceDesc.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = axisServiceDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisConfiguration baseConfig = configurationContext.getAxisConfiguration();

        moduleConfig = baseConfig.getModuleConfig(moduleName);

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

            if (param != null) {
                return param;
            } else {
                param = baseConfig.getParameter(key);
View Full Code Here


            if (moduleName_att == null) {
                throw new DeploymentException(
                        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
            } else {
                String module = moduleName_att.getAttributeValue();
                ModuleConfiguration moduleConfiguration =
                        new ModuleConfiguration(module, parent);
                Iterator parameters = moduleConfig.getChildrenWithName(new QName(TAG_PARAMETER));

                processParameters(parameters, moduleConfiguration, parent);
                config.addModuleConfig(moduleConfiguration);
            }
View Full Code Here

    public void testModuleConfigAtAxisConfig() {
        try {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            ar = builder.createConfigurationContextFromFileSystem(repo).getAxisConfiguration();
            ModuleConfiguration moduleConfiguration =
                    ar.getModuleConfig(new QName("testModule"));
            assertNotNull(moduleConfiguration);
            Parameter para = moduleConfiguration.getParameter("testModulePara");
            assertNotNull(para);

            moduleConfiguration =
                    ar.getModuleConfig(new QName("testModule2"));
            assertNotNull(moduleConfiguration);
            para = moduleConfiguration.getParameter("testModulePara2");
            assertNotNull(para);
        } catch (AxisFault e) {
            fail("This can not fail with this DeploymentException " + e);
        }
    }
View Full Code Here

            ar.addService(service);
            InputStream in = new FileInputStream(repo + "/service1.xml");
            ServiceBuilder sbuilder = new ServiceBuilder(in, new AxisConfiguration(), service);
            sbuilder.populateService(sbuilder.buildOM());

            ModuleConfiguration moduleConfiguration = service.getModuleConfig(new QName("Servie_module"));
            assertNotNull(moduleConfiguration);
            Parameter para = moduleConfiguration.getParameter("Servie_module_para");
            assertNotNull(para);

            AxisOperation op = service.getOperation(new QName("echoString"));
            assertNotNull(op);

            moduleConfiguration = op.getModuleConfig(new QName("Op_Module"));
            assertNotNull(moduleConfiguration);
            para = moduleConfiguration.getParameter("Op_Module_para");
            assertNotNull(para);


        } catch (DeploymentException e) {
            fail("This can not fail with this DeploymentException " + e);
View Full Code Here

     * @return Parameter <code>Parameter</code>
     */
    public Parameter getModuleParameter(String key, String moduleName,
                                        HandlerDescription handler) {
        Parameter param;
        ModuleConfiguration moduleConfig;

        AxisOperation opDesc = getAxisOperation();

        if (opDesc != null) {

            moduleConfig = opDesc.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = opDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisService axisService = getAxisService();

        if (axisService != null) {

            moduleConfig = axisService.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = axisService.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisServiceGroup axisServiceDesc = getAxisServiceGroup();

        if (axisServiceDesc != null) {

            moduleConfig = axisServiceDesc.getModuleConfig(moduleName);

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

                if (param != null) {
                    return param;
                } else {
                    param = axisServiceDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisConfiguration baseConfig = configurationContext.getAxisConfiguration();

        moduleConfig = baseConfig.getModuleConfig(moduleName);

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

            if (param != null) {
                return param;
            } else {
                param = baseConfig.getParameter(key);
View Full Code Here

    // property then we'll need to revisit this.
    SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(context.getAxisConfiguration());
    useSerialization = policy.isUseMessageSerialization();
    if (policy.isInOrder()) invoker = new Invoker();
    if (policy.isEnableMakeConnection()) pollingManager = new PollingManager();
    ModuleConfiguration mc = context.getAxisConfiguration().getModuleConfig("sandesha2");
        if (mc != null) {
            Parameter param = mc.getParameter("db.connectionstring");
            if (param != null) {
                dbConnectionString = (String) param.getValue();
                log.debug(param.getName() + "=" + dbConnectionString);
            }
            param = mc.getParameter("db.driver");
            if (param != null) {
                dbDriver = (String) param.getValue();
                log.debug(param.getName() + "=" + dbDriver);
            }
            param = mc.getParameter("db.user");
            if (param != null) {
                dbUser = (String) param.getValue();
                log.debug(param.getName() + "=" + dbUser);
            }
            param = mc.getParameter("db.password");
            if (param != null) {
                dbPassword = (String) param.getValue();
                log.debug(param.getName() + "=" + dbPassword);
            }
        }
View Full Code Here


    public void testModuleConfigAtAxisConfig() {
        try {
            ar = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, axis2xml).getAxisConfiguration();
            ModuleConfiguration moduleConfiguration =
                    ar.getModuleConfig(new QName("testModule"));
            assertNotNull(moduleConfiguration);
            Parameter para = moduleConfiguration.getParameter("testModulePara");
            assertNotNull(para);

            moduleConfiguration =
                    ar.getModuleConfig(new QName("testModule2"));
            assertNotNull(moduleConfiguration);
            para = moduleConfiguration.getParameter("testModulePara2");
            assertNotNull(para);
        } catch (AxisFault e) {
            fail("This can not fail with this DeploymentException " + e);
        }
    }
View Full Code Here

            ar.addService(service);
            InputStream in = new FileInputStream(repo + "/service1.xml");
            ServiceBuilder sbuilder = new ServiceBuilder(in, new AxisConfiguration(), service);
            sbuilder.populateService(sbuilder.buildOM());

            ModuleConfiguration moduleConfiguration = service.getModuleConfig(new QName("Servie_module"));
            assertNotNull(moduleConfiguration);
            Parameter para = moduleConfiguration.getParameter("Servie_module_para");
            assertNotNull(para);

            AxisOperation op = service.getOperation(new QName("echoString"));
            assertNotNull(op);

            moduleConfiguration = op.getModuleConfig(new QName("Op_Module"));
            assertNotNull(moduleConfiguration);
            para = moduleConfiguration.getParameter("Op_Module_para");
            assertNotNull(para);


        } catch (DeploymentException e) {
            fail("This can not fail with this DeploymentException " + e);
View Full Code Here

     * @return Parameter <code>Parameter</code>
     */
    public Parameter getModuleParameter(String key, String moduleName,
                                        HandlerDescription handler) {
        Parameter param;
        ModuleConfiguration moduleConfig;

        if (getAxisOperation() != null) {
            AxisOperation opDesc = getAxisOperation();

            moduleConfig = opDesc.getModuleConfig(new QName(moduleName));

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

                if (param != null) {
                    return param;
                } else {
                    param = opDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        if (getAxisService() != null) {
            AxisService axisService = getAxisService();

            moduleConfig = axisService.getModuleConfig(new QName(moduleName));

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

                if (param != null) {
                    return param;
                } else {
                    param = axisService.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        if (getAxisServiceGroup() != null) {
            AxisServiceGroup axisServiceDesc = getAxisServiceGroup();

            moduleConfig = axisServiceDesc
                    .getModuleConfig(new QName(moduleName));

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

                if (param != null) {
                    return param;
                } else {
                    param = axisServiceDesc.getParameter(key);

                    if (param != null) {
                        return param;
                    }
                }
            }
        }

        AxisConfiguration baseConfig = configurationContext
                .getAxisConfiguration();

        moduleConfig = baseConfig.getModuleConfig(new QName(moduleName));

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

            if (param != null) {
                return param;
            } else {
                param = baseConfig.getParameter(key);
View Full Code Here

            if (moduleName_att == null) {
                throw new DeploymentException(
                        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
            } else {
                String module = moduleName_att.getAttributeValue();
                ModuleConfiguration moduleConfiguration =
                        new ModuleConfiguration(new QName(module), parent);
                Iterator parameters = moduleConfig.getChildrenWithName(new QName(TAG_PARAMETER));

                processParameters(parameters, moduleConfiguration, parent);
                axisService.addModuleConfig(moduleConfiguration);
            }
View Full Code Here

TOP

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

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.