Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContextFactory


     */
    public void init(ServletConfig config) throws ServletException {
        try {
            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


     * @throws AxisFault
     */
    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

    String repo ="./test-resources/deployment/serviceGroupRepo";



    protected void setUp() throws Exception {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
    }
View Full Code Here

        super(testName);
    }

    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("service2");
        assertNotNull(service);
View Full Code Here

    AxisConfiguration ar;
    String repo ="./test-resources/deployment/ServiceGroup";


    public void testServiceGroup() throws AxisFault {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
        ServiceDescription servie = ar.getService("serevice1");
        assertNotNull(servie);
        servie = ar.getService("serevice4");
        assertNotNull(servie);
View Full Code Here

        configurationContext.registerServiceGroupContext(serviceGroupContext);
        return new ServiceContext(serviceDesc, serviceGroupContext);
    }

    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

            throws AxisFault {
        ConfigurationContext sysContext = null;
        //we are trying to keep one configuration Context at the Client side. That make it easier to
        //manage the TransportListeners. But using the static referance is bit crude!.
        if (ListenerManager.configurationContext == null) {
            ConfigurationContextFactory efac =
                    new ConfigurationContextFactory();
            sysContext = efac.buildClientConfigurationContext(clientHome);
           // ListenerManager.configurationContext = sysContext;
        } else {
            sysContext = ListenerManager.configurationContext;
        }
View Full Code Here

    public void testStorage() throws
            DeploymentException,
            AxisFault,
            XMLStreamException {
        String filename = "./target/test-resources/deployment";
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        cc = builder.buildConfigurationContext(filename);
        AxisEngine engine =new  AxisEngine(cc);
        assertNotNull(engine);
        String myTestVal = "There is a value";
        String key = (String)engine.store(cc,myTestVal);
        assertNotNull(key);
View Full Code Here

    String repo ="./test-resources/deployment/dispatch_repo";



    public void testDispatch() throws Exception {
        ConfigurationContextFactory builder = new ConfigurationContextFactory();
        ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
        ArrayList list = ar.getInPhasesUptoAndIncludingPostDispatch();
        for (int i = 0; i < list.size(); i++) {
            Phase phase = (Phase) list.get(i);
            if(PhaseMetadata.PHASE_DISPATCH.equals(phase.getPhaseName())){
                assertEquals(3,phase.getHandlerCount());
View Full Code Here

    public void testModuleEngageMent() throws PhaseException,
            DeploymentException,
            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("service2");
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.