Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory


        value2.addChild(subValue2);
        value2.addChild(subValue1);
        operation.addChild(value2);
        operation.addChild(value1);

        ConfigurationContextFactory fac = new ConfigurationContextFactory();
        ConfigurationContext configContext = null;
        try {
            configContext = fac.buildClientConfigurationContext("Search");
        } catch (DeploymentException e) {
            e.printStackTrace();
        }
        try {
            msgContext = new MessageContext(configContext);
View Full Code Here


    public AddressingModuleTest(String testName) {
        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

        start(org.apache.axis2.Constants.TESTING_REPOSITORY);
    }

    public static synchronized void start(String repositry) throws Exception {
        if (count == 0) {
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            File file = new File(repositry);
            if (!file.exists()) {
                throw new Exception("repository directory "+ file.getAbsolutePath()+ " does not exists");
            }
            ConfigurationContext er = erfac.buildConfigurationContext(file.getAbsolutePath());
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e1) {
                throw new AxisFault("Thread interuptted", e1);
            }
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(null);
       
        sysContext.getAxisConfiguration().addMdoule(moduleDesc);
        //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

        sysContext.getAxisConfiguration().addService(service);
View Full Code Here

                }
                call.close();

        }
        public ConfigurationContext createServerConfigurationContext() throws Exception {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            ConfigurationContext configContext =
                builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);

            TransportInDescription transportIn =
                new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "server@127.0.0.1"));
View Full Code Here

            configContext.getAxisConfiguration().addTransportOut(transportOut);
            return configContext;
        }

        public ConfigurationContext createClientConfigurationContext() throws Exception {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            ConfigurationContext configContext =
                builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);

            TransportInDescription transportIn =
                new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "client@127.0.0.1"));
View Full Code Here

     */
    public SimpleHTTPServer(String dir, ServerSocket serverSoc) throws AxisFault {
        try {
            this.serverSocket = serverSoc;
            // Class erClass = Class.forName("org.apache.axis2.deployment.EngineContextFactoryImpl");
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            this.configurationContext = erfac.buildConfigurationContext(dir);
            Thread.sleep(2000);
        } catch (Exception e1) {
            throw new AxisFault("Thread interuptted", e1);
        }
    }
View Full Code Here

    public static synchronized void start() throws Exception {
        if (count == 0) {

            //start tcp server

            ConfigurationContextFactory erfac =
                new ConfigurationContextFactory();
            File file = new File(org.apache.axis2.Constants.TESTING_REPOSITORY);
            System.out.println(file.getAbsoluteFile());
            if (!file.exists()) {
                throw new Exception("repository directory does not exists");
            }

            configurationContext =
                erfac.buildConfigurationContext(file.getAbsolutePath());
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e1) {
                throw new AxisFault("Thread interuptted", e1);
            }
View Full Code Here

    }

    public ConfigurationContext createNewConfigurationContext() throws Exception {
        File file = new File(MAIL_TRANSPORT_ENABLED_REPO_PATH);
        assertTrue("Mail repository directory "+ file.getAbsolutePath() + " does not exsist",file.exists());
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ConfigurationContext configContext =
            builder.buildConfigurationContext(file.getAbsolutePath());
        return configContext;
    }
View Full Code Here

            } else {
                throw new DeploymentException("can not found org/apache/axis2/deployment/axis2.xml");

            }
        }
        factory = new ConfigurationContextFactory();
        this.engineConfigName = RepositaryName + '/' + serverXMLFile;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.context.ConfigurationContextFactory

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.