Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory


        return values;
    }

    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.createConfigurationContextFromFileSystem(file.getAbsolutePath());
    }
View Full Code Here


        pop3Server.start();
    }

    public MailServer(String dir, int popPort, int smtpPort) throws AxisFault {
        try {
            ConfigurationContextFactory builder = new ConfigurationContextFactory();

            configurationContext = builder.createConfigurationContextFromFileSystem(dir);
        } catch (Exception e) {
            log.error(e);
        }

        try {
View Full Code Here

     */
    protected ConfigurationContext initConfigContext(ServletConfig config) throws ServletException {
        try {
            ServletContext context = config.getServletContext();
            String repoDir = context.getRealPath("/WEB-INF");
            ConfigurationContextFactory erfac = new ConfigurationContextFactory();
            ConfigurationContext configContext = erfac.createConfigurationContextFromFileSystem(repoDir);
            configContext.setProperty(Constants.CONTAINER_MANAGED, Constants.VALUE_TRUE);
            configContext.setRootDir(new File(context.getRealPath("/WEB-INF")));
            return configContext;
        } catch (Exception e) {
            throw new ServletException(e);
View Full Code Here

     */
    public SimpleHTTPServer(String dir, int port, ThreadFactory pool) throws AxisFault {
        try {
            this.port = port;

            ConfigurationContextFactory erfac = new ConfigurationContextFactory();

            this.configurationContext = erfac.createConfigurationContextFromFileSystem(dir);

            // If a thread pool is not passed the thread pool from the config context
            // is used. If one is passed it is set on the config context.
            if (pool == null) {
                pool = this.configurationContext.getThreadPool();
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

        operation.addChild(getOMElement(omFactory, defNs, "safeSearch", "xsd:boolean", "false"));
        operation.addChild(getOMElement(omFactory, defNs, "lr", "xsd:string", ""));
        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 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

        }
        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

                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");

        sysContext.getAxisConfiguration().addModule(moduleDesc);
        //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

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

                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);

        sysContext.getAxisConfiguration().addModule(moduleDesc);
        //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

        sysContext.getAxisConfiguration().addService(service);
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.