Package org.apache.axis2.description

Examples of org.apache.axis2.description.ModuleDescription


        DeploymentEngine deploymentEngine = new DeploymentEngine();
        File file = new File(
                org.apache.axis2.Constants.TESTING_REPOSITORY +
                        "/modules/addressing.mar");
        TestCase.assertTrue(file.exists());
        ModuleDescription moduleDesc = deploymentEngine.buildModule(file);

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext("target/test-resources/intregrationRepo");
View Full Code Here


        DeploymentEngine deploymentEngine = new DeploymentEngine();
        File file = new File(
                org.apache.axis2.Constants.TESTING_REPOSITORY +
                        "/modules/addressing.mar");
        TestCase.assertTrue(file.exists());
        ModuleDescription moduleDesc = deploymentEngine.buildModule(file);

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext(clientHome);
View Full Code Here

     * @throws PhaseException
     */
    private void buildExcutionChains(int type, OperationDescription operation)
            throws AxisFault, PhaseException {
        ArrayList allHandlers = new ArrayList();
        ModuleDescription module;
        Flow flow = null;
        ///////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////// Handlers from   axis2.xml from modules/////////////////////////
        ArrayList modulqnames = (ArrayList) ((AxisConfigurationImpl) axisConfig).getEngadgedModules();
        for (int i = 0; i < modulqnames.size(); i++) {
            QName modulename = (QName) modulqnames.get(i);
            module = axisConfig.getModule(modulename);
            if (module != null) {
                switch (type) {
                    case PhaseMetadata.IN_FLOW:
                    {
                        flow = module.getInFlow();
                        break;
                    }
                    case PhaseMetadata.OUT_FLOW:
                    {
                        flow = module.getOutFlow();
                        break;
                    }
                    case PhaseMetadata.FAULT_IN_FLOW:
                    {
                        flow = module.getFaultInFlow();
                        break;
                    }
                    case PhaseMetadata.FAULT_OUT_FLOW:
                    {
                        flow = module.getFaultOutFlow();
                        break;
                    }
                }
                axisService.addToEngagModuleList(module);
                operation.addToEngageModuleList(module);
View Full Code Here

        for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
            OperationDescription opDesc = (OperationDescription) iterator.next();
            Collection modules = opDesc.getModules();
            for (Iterator iterator1 = modules.iterator();
                 iterator1.hasNext();) {
                ModuleDescription description = (ModuleDescription) iterator1.next();
                if (description.getName().equals(module.getName())) {
                    engaged = true;
                    break;
                }
            }
            if (engaged) {
View Full Code Here

        for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
            OperationDescription opDesc = (OperationDescription) iterator.next();
            Collection modules = opDesc.getModules();
            for (Iterator iterator1 = modules.iterator();
                 iterator1.hasNext();) {
                ModuleDescription description = (ModuleDescription) iterator1.next();
                if (description.getName().equals(module.getName())) {
                    engaged = true;
                    break;
                }
            }
            if (!engaged) {
View Full Code Here

    }

     public void testOveride_Non_locked_Para_Module(){
        try {
            assertNotNull(ar);
            ModuleDescription module = new ModuleDescription();
            module.setParent(ar);
            InputStream in = new FileInputStream(repo + "/module_overide_global_non_locked_para.xml");
            ModuleBuilder mbuilder = new ModuleBuilder(in,null,module);
            mbuilder.populateModule();
        }catch (FileNotFoundException e) {
            fail("This can not fail with this FileNotFoundException " + e) ;
View Full Code Here

     }

     public void testOveride_locked_Para_Module(){
        try {
            assertNotNull(ar);
            ModuleDescription module = new ModuleDescription();
            module.setParent(ar);
            InputStream in = new FileInputStream(repo + "/module_overide_locked_para.xml");
            ModuleBuilder mbuilder = new ModuleBuilder(in,null,module);
            mbuilder.populateModule();
            fail("Parmter is locked can not overide" ) ;
        }catch (FileNotFoundException e) {
View Full Code Here

            serviceDescription.setFileName(currentArchiveFile.getFile().getAbsolutePath());

            //module form serviceGroup
            ArrayList groupModules = serviceMetaData.getModules();
            for (int i = 0; i < groupModules.size(); i++) {
                ModuleDescription module = axisConfig.getModule((QName) groupModules.get(i));
                if (module != null) {
                    serviceDescription.engageModule(module, axisConfig);
                } else {
                    throw new DeploymentException(Messages.getMessage(
                            DeploymentErrorMsgs.IN_VALID_MODUELE_REF, serviceDescription.getName().
                            getLocalPart(), ((QName) groupModules.get(i)).getLocalPart()));
                }
            }

            //modules from <service>
            ArrayList list = serviceDescription.getModules();
            for (int i = 0; i < list.size(); i++) {
                ModuleDescription module = axisConfig.getModule((QName) list.get(i));
                if (module != null) {
                    serviceDescription.engageModule(module, axisConfig);
                } else {
                    throw new DeploymentException(Messages.getMessage(
                            DeploymentErrorMsgs.IN_VALID_MODUELE_REF, serviceDescription.getName().
                            getLocalPart(), ((QName) list.get(i)).getLocalPart()));
                }
            }

            HashMap opeartions = serviceDescription.getOperations();
            Collection opCol = opeartions.values();
            for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
                OperationDescription opDesc = (OperationDescription) iterator.next();
                ArrayList modules = opDesc.getModuleRefs();
                for (int i = 0; i < modules.size(); i++) {
                    QName moduleName = (QName) modules.get(i);
                    ModuleDescription module = axisConfig.getModule(moduleName);
                    if (module != null) {
                        opDesc.engageModule(module);
                    } else {
                        throw new DeploymentException(Messages.getMessage(
                                DeploymentErrorMsgs.IN_VALID_MODUELE_REF_BY_OP, opDesc.getName()
View Full Code Here

                        case MODULE:
                            currentArchiveFile.setClassLoader(explodedDir);
                            archiveReader = new ArchiveReader();
                            String moduleStatus = "";
                            try {
                                ModuleDescription metaData = new ModuleDescription();
                                metaData.setParent(axisConfig);
                                archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(),
                                        this,
                                        metaData,explodedDir);
                                addNewModule(metaData);
                                log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE,
                                        metaData.getName().getLocalPart()));
//                                    "Moduel WS Name  " +
//                                    currentArchiveFile.getName() +
//                                    " modulename :" +
//                                    metaData.getName());
                            } catch (DeploymentException e) {
View Full Code Here

        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ac =
                builder.buildConfigurationContext(filename)
                .getAxisConfiguration();
        ModuleDescription module = ac.getModule(new QName("module1"));
        assertNotNull(module);
        ac.engageModule(new QName("module1"));
        ServiceDescription service = ac.getService("service2");
        assertNotNull(service);
        OperationDescription moduleOperation = service.getOperation(
View Full Code Here

TOP

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

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.