Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory.buildConfigurationContext()


    public void testAddingObservs() throws Exception{
        try {
            String filename = "./test-resources/deployment/ConfigWithObservers";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =  builder.buildConfigurationContext(filename).getAxisConfiguration();
            assertNotNull(er);
        } catch (DeploymentException e) {
            throw new DeploymentException(e);
        }
    }
View Full Code Here


        super(testName);
    }

    public void testExtractAddressingInformationFromHeaders() throws AxisFault {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        AxisConfiguration er = builder.buildConfigurationContext("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

            AxisFault,
            XMLStreamException {
        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(new QName("service2"));
View Full Code Here

    }

    public void testDeployment() throws Exception {
        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        AxisConfiguration er = builder.buildConfigurationContext(filename)
                .getAxisConfiguration();

        assertNotNull(er);
        ServiceDescription service = er.getService(new QName("service2"));
        assertNotNull(service);
View Full Code Here

    public void testInvalidService() {
        try {
            String filename = "./target/test-resources/InvalidDeployment";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =
                    builder.buildConfigurationContext(filename)
                    .getAxisConfiguration();
            String msg = (String) er.getFaulytServices().get("invalidService");
            if (msg == null || msg.equals("")) {
                fail("this must failed gracefully with AxisFault ervice specifi module can not" +
                        "refer system pre defined phases");
View Full Code Here

            AxisFault,
            XMLStreamException {
        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        er =
                builder.buildConfigurationContext(filename)
                .getAxisConfiguration();
    }

}
View Full Code Here

    public void testPhaseOrderchage() {
        try {
            String filename = "./test-resources/deployment/SystemPhaseRemove";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =
                    builder.buildConfigurationContext(filename)
                    .getAxisConfiguration();
            fail(
                    "this must failed gracefully with DeploymentException \"Invalid System predefined " +
                    "inphases , phase order dose not\" +\n support\\n recheck axis2.xml\"");
        } catch (DeploymentException e) {
View Full Code Here

    public void testPhaseOrderchage() {
        try {
            String filename = "./test-resources/deployment/BadConfigOrderChange";
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            er =
                    builder.buildConfigurationContext(filename)
                    .getAxisConfiguration();
            fail(
                    "this must failed gracefully with DeploymentException \"Invalid System predefined " +
                    "inphases , phase order dose not\" +\n support\\n recheck axis2.xml\"");
        } catch (DeploymentException e) {
View Full Code Here

     */
    public SimpleHTTPServer(String dir, int port) throws AxisFault {
        try {
            this.port = port;
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            this.configurationContext = erfac.buildConfigurationContext(dir);
            Thread.sleep(2000);
        } catch (Exception e1) {
            throw new AxisFault(e1);
        }
    }
View Full Code Here

            ServletContext context = config.getServletContext();
            String repoDir = context.getRealPath("/WEB-INF");
            ConfigurationContextFactory erfac =
                    new ConfigurationContextFactory();
            configContext =
                    erfac.buildConfigurationContext(repoDir);
            configContext.setProperty(Constants.CONTAINER_MANAGED,
                    Constants.VALUE_TRUE);
            configContext.setRootDir(new File(context.getRealPath("/WEB-INF")));
            lister = new ListingAgent(configContext);
            context.setAttribute(CONFIGURATION_CONTEXT, configContext);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.