Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory


        }
        count++;
    }

    public static ConfigurationContext getNewConfigurationContext(String repositry) throws Exception {
        ConfigurationContextFactory erfac = new ConfigurationContextFactory();
        File file = new File(repositry);
        if (!file.exists()) {
            throw new Exception(
                    "repository directory " + file.getAbsolutePath() +
                            " does not exists");
        }
        return erfac.buildConfigurationContext(
                file.getAbsolutePath());
    }
View Full Code Here


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

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext("target/test-resources/intregrationRepo");
         ModuleDescription moduleDesc = deploymentEngine.buildModule(file,sysContext.getAxisConfiguration());
        sysContext.getAxisConfiguration().addModule(moduleDesc);
        //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

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

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

        ConfigurationContextFactory efac = new ConfigurationContextFactory();
        ConfigurationContext sysContext =
                efac.buildClientConfigurationContext(clientHome);
        ModuleDescription moduleDesc = deploymentEngine.buildModule(file,sysContext.getAxisConfiguration());

        sysContext.getAxisConfiguration().addModule(moduleDesc);
        //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());
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 exist");
            }

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

        call.close();

    }

    public void testEchoXMLSyncMC() throws Exception {
        ConfigurationContextFactory confac = new ConfigurationContextFactory();
        ConfigurationContext configContext = confac.buildClientConfigurationContext(Constants.TESTING_REPOSITORY);

        AxisOperation opdesc = new OutInAxisOperation(new QName("echoOMElement"));
        org.apache.axis2.client.Call call = new org.apache.axis2.client.Call(Constants.TESTING_REPOSITORY);
        Options options = new Options();
        call.setClientOptions(options);
View Full Code Here

        if(SERVER_CONFIG_CONTEXT == null){
            File file = new File(MAIL_TRANSPORT_SERVER_ENABLED_REPO_PATH);
            TestCase.assertTrue(
                    "Mail repository directory " + file.getAbsolutePath() + " does not exsist",
                    file.exists());
            ConfigurationContextFactory builder = new ConfigurationContextFactory();
            SERVER_CONFIG_CONTEXT =
                    builder.buildConfigurationContext(file.getAbsolutePath());
        }
        return SERVER_CONFIG_CONTEXT;
    }
View Full Code Here

        if(CLIENT_CONFIG_CONTEXT == null){
        File file = new File(MAIL_TRANSPORT_CLIENT_ENABLED_REPO_PATH);
        TestCase.assertTrue(
                "Mail repository directory " + file.getAbsolutePath() + " does not exsist",
                file.exists());
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        CLIENT_CONFIG_CONTEXT =
                builder.buildConfigurationContext(file.getAbsolutePath());
        }
        return CLIENT_CONFIG_CONTEXT;
    }
View Full Code Here

     * @throws org.apache.axis2.AxisFault
     */
    protected void assumeServiceContext(String clientHome)
            throws AxisFault {
        ConfigurationContext configurationContext =
                new ConfigurationContextFactory().buildClientConfigurationContext(clientHome);

        QName assumedServiceName = new QName("AnonymousService");
        AxisService axisService = configurationContext.getAxisConfiguration().getService("AnonymousService");
        if (axisService == null) {
            //we will assume a Service and operations
View Full Code Here

        operation.addChild(
                getOMElement(omFactory, defNs, "ie", "xsd:string", "latin1"));
        operation.addChild(
                getOMElement(omFactory, defNs, "oe", "xsd:string", "latin1"));

        ConfigurationContextFactory fac = new ConfigurationContextFactory();
        ConfigurationContext configContext = fac.buildClientConfigurationContext(
                "doGoogleSearch");
        try {
            msgContext = new MessageContext(configContext);
        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
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

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.