Package org.apache.axis2.description

Examples of org.apache.axis2.description.ModuleDescription


            throws DeploymentException {
        Parameter serverCtxParam =
                cfgCtx.getAxisConfiguration().getParameter(
                        SynapseConstants.SYNAPSE_SERVER_CTX_INFO);
        if (serverCtxParam == null) {
            throw new DeploymentException("ServerContextInformation not found. " +
                    "Are you sure that you are running Synapse?");
        }
        return (ServerContextInformation) serverCtxParam.getValue();
    }
View Full Code Here


            String opName = null;

            if (synCtx.getProperty(SynapseConstants.ENDPOINT_OPERATION) != null) {
                opName = synCtx.getProperty(SynapseConstants.ENDPOINT_OPERATION).toString();
            } else if (synCtx instanceof Axis2MessageContext) {
                AxisOperation operation
                        = ((Axis2MessageContext) synCtx).getAxis2MessageContext().getAxisOperation();
                if (operation != null) {
                    opName = operation.getName().getLocalPart();
                }
                if (opName == null ||
                        SynapseConstants.SYNAPSE_OPERATION_NAME.getLocalPart().equals(opName)) {
                    String soapAction = synCtx.getSoapAction();
                    opName = null;
View Full Code Here

        //  2) request is to be injected into  the main sequence  .i.e. http://localhost:8280
        // This method does not cause any performance issue ...
        // Proper fix should be refractoring axis2 RestUtil in a proper way
        if (dispatching) {
            RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher();
            AxisService axisService = requestDispatcher.findService(msgContext);
            if (axisService == null) {
                String defaultSvcName = NHttpConfiguration.getInstance().getStringValue(
                        "nhttp.default.service", "__SynapseService");
                axisService = msgContext.getConfigurationContext()
                        .getAxisConfiguration().getService(defaultSvcName);
View Full Code Here

        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        AxisConfiguration er = builder.createConfigurationContextFromFileSystem("target")
                .getAxisConfiguration();
        File file = new File("target/addressing.mar");
        assertTrue(file.exists());
        ModuleDescription moduleDesc = er.getModule(new QName("addressing"));
        assertNotNull(moduleDesc);
    }
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,module,ar);
            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,module,ar);
            mbuilder.populateModule();
            fail("Parmter is locked can not overide" ) ;
        }catch (FileNotFoundException e) {
View Full Code Here

            Parameter para = new ParameterImpl();
            para.setValue(null);
            para.setName("PARA_NAME");
            para.setLocked(true);
            reg.addParameter(para);
            ModuleDescription module = new ModuleDescription(new QName("Service1"));
            module.setParent(reg);
            module.addParameter(para);
            fail("This should fails with Parmter is locked can not overide");
        } catch (AxisFault axisFault) {

        }
    }
View Full Code Here

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

        assertEquals(ac.getDefaultModuleVersion("foo"), "0.89");
    }

    public void testCalculateDefaultModuleVersions() throws AxisFault {
        AxisConfiguration axiConfiguration = new AxisConfiguration();
        ModuleDescription module1 = new ModuleDescription();
        module1.setName(new QName("Module1"));
        axiConfiguration.addModule(module1);

        ModuleDescription module2 = new ModuleDescription();
        module2.setName(new QName("Module2-0.94"));
        axiConfiguration.addModule(module2);

        ModuleDescription module3 = new ModuleDescription();
        module3.setName(new QName("Module2-0.95"));
        axiConfiguration.addModule(module3);

        ModuleDescription module4 = new ModuleDescription();
        module4.setName(new QName("Module2-0.93"));
        axiConfiguration.addModule(module4);

        ModuleDescription module5 = new ModuleDescription();
        module5.setName(new QName("testModule-1.93"));
        axiConfiguration.addModule(module5);

        Utils.calculateDefaultModuleVersion(axiConfiguration.getModules(), axiConfiguration);
        assertEquals(module1, axiConfiguration.getDefaultModule("Module1"));
        assertEquals(module3, axiConfiguration.getDefaultModule("Module2"));
View Full Code Here

                    return param;
                }
            }
        }

        ModuleDescription module = baseConfig.getModule(new QName(moduleName));

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

            if (param != null) {
                return param;
            }
        }
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.