Package org.apache.axis2.phaseresolver

Examples of org.apache.axis2.phaseresolver.PhaseResolver


            if (service != null) {
                service.addModuleOperations(axisModule);
            }
        }
        AxisConfiguration axisConfig = getAxisConfiguration();
        PhaseResolver phaseResolver = new PhaseResolver(axisConfig);
        phaseResolver.engageModuleToOperation(this, axisModule);
    }
View Full Code Here


    protected void onDisengage(AxisModule module) {
        AxisService service = getAxisService();
        if (service == null) return;

        AxisConfiguration axisConfiguration = service.getAxisConfiguration();
        PhaseResolver phaseResolver = new PhaseResolver(axisConfiguration);
        if (!service.isEngaged(module.getName()) &&
            (axisConfiguration != null && !axisConfiguration.isEngaged(module.getName()))) {
            phaseResolver.disengageModuleFromGlobalChains(module);
        }
        phaseResolver.disengageModuleFromOperationChain(module, this);

        //removing operations added at the time of module engagemnt
        HashMap<QName, AxisOperation> moduleOperations = module.getOperations();
        if (moduleOperations != null) {
            Iterator<AxisOperation> moduleOperations_itr = moduleOperations.values().iterator();
View Full Code Here

                            "  operation terminated !!!");
                }

            }
        }
        new PhaseResolver().engageModuleToOperation(this, moduleref);
        Collection collectionModule = (Collection) this.getComponentProperty(
                MODULEREF_KEY);
        collectionModule.add(moduleref);
    }
View Full Code Here

    //        }
    //    }
    public static void resolvePhases(AxisConfiguration axisconfig,
                                     ServiceDescription serviceDesc)
            throws AxisFault, PhaseException {
        PhaseResolver pr = new PhaseResolver(axisconfig, serviceDesc);
        pr.buildchains();
    }
View Full Code Here

                        " module has alredy been engaged on the service Group. " +
                        " Operation terminated !!!");
            }
        }
        Iterator srevice = getServices();
        PhaseResolver phaseResolver = new PhaseResolver(this.getParent());
        ModuleDescription module = this.parent.getModule(moduleName);
        if (module !=null) {
            while (srevice.hasNext()) {
                // engagin per each service
                ServiceDescription serviceDescription = (ServiceDescription) srevice.next();
                phaseResolver.engageModuleToService(serviceDescription, module);
            }
        }
        addModule(moduleName);
    }
View Full Code Here

        return services.values().iterator();
    }

    public synchronized void addService(ServiceDescription service) throws AxisFault {
        services.put(service.getName(), service);
        PhaseResolver handlerResolver = new PhaseResolver(this.parent, service);
        handlerResolver.buildchains();
        service.setLastupdate();
        service.setParent(this);
    }
View Full Code Here

                        " module has alredy been engaged on the service. " +
                        " Operation terminated !!!");
            }

        }
        new PhaseResolver(axisConfig).engageModuleToService(this, moduleref);
        collectionModule.add(moduleref);
    }
View Full Code Here

    public void addModuleOperations(ModuleDescription module,
                                    AxisConfiguration axisConfig) throws AxisFault {
        HashMap map = module.getOperations();
        Collection col = map.values();
        PhaseResolver pr = new PhaseResolver(axisConfig, this);

        for (Iterator iterator = col.iterator(); iterator.hasNext();) {
            OperationDescription operation = (OperationDescription) iterator.next();
            ArrayList paramters = operation.getParameters();
            // Adding wsa-maping into service
            for (int j = 0; j < paramters.size(); j++) {
                Parameter parameter = (Parameter) paramters.get(j);
                if(parameter.getName().equals(Constants.WSA_ACTION)){
                    this.addMapping((String)parameter.getValue(),operation);
                }
            }
            pr.buildModuleOperation(operation);
            this.addOperation(operation);
        }
    }
View Full Code Here

        ConfigurationContext configurationContext = null;
        try {
            DeploymentEngine deploymentEngine =
                    new DeploymentEngine(repositoryName);
            AxisConfiguration configuration = deploymentEngine.load();
            PhaseResolver phaseResolver = new PhaseResolver(configuration);

            Parameter parameter = configuration.getParameter("seralizeLocation");
            String serailzeLocaion = ".";
            if (parameter !=null) {
                serailzeLocaion = ((String)parameter.getValue()).trim();
            }
            File objFile = new File(serailzeLocaion,"Axis2.obj");
            if(objFile.exists()){
                try {
                    FileInputStream filein = new FileInputStream(objFile);
                    ObjectInputStream in = new ObjectInputStream(filein);
                    Object obj = in.readObject();
                    if(obj instanceof ConfigurationContext){
                        configurationContext = (ConfigurationContext)obj;
                        configurationContext.init(configuration);
                    }
                } catch (IOException e) {
                    log.info(e.getMessage());
                } catch (ClassNotFoundException e) {
                    log.info(e.getMessage());
                }
            }
            if(configurationContext == null){
                configurationContext = new ConfigurationContext(configuration);
            }
//            configurationContext = new ConfigurationContext(configuration);
            phaseResolver.buildTranspotsChains();
            initModules(configurationContext);
            initTransports(configurationContext);
        } catch (AxisFault axisFault) {
            throw new DeploymentException(axisFault);
        }
View Full Code Here

            throws DeploymentException {
        ConfigurationContext engineContext = null;
        try {
            AxisConfiguration configuration =
                    new DeploymentEngine().loadClient(axis2home);
            PhaseResolver phaseResolver = new PhaseResolver(configuration);

            File objFile = new File("./Axis2.obj");
            if(objFile.exists()){
                try {
                    FileInputStream filein = new FileInputStream(objFile);
                    ObjectInputStream in = new ObjectInputStream(filein);
                    Object obj = in.readObject();
                    if(obj instanceof ConfigurationContext){
                        engineContext = (ConfigurationContext)obj;
                        engineContext.init(configuration);
                    }
                } catch (IOException e) {
                    log.info(e.getMessage());
                } catch (ClassNotFoundException e) {
                    log.info(e.getMessage());
                }
            }
            if(engineContext == null){
                engineContext = new ConfigurationContext(configuration);
            }

//            engineContext = new ConfigurationContext(configuration);
            phaseResolver.buildTranspotsChains();
            initModules(engineContext);
            initTransports(engineContext);
        } catch (AxisFault axisFault) {
            throw new DeploymentException(axisFault);
        }
View Full Code Here

TOP

Related Classes of org.apache.axis2.phaseresolver.PhaseResolver

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.