Package org.apache.axis2.description

Examples of org.apache.axis2.description.Flow


        }
    }


    private void enageToGlobalChain(ModuleDescription module) throws PhaseException {
        Flow flow = null;
        for (int type = 1; type < 5; type++) {
            switch (type) {
                case PhaseMetadata.IN_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(axisConfig.
                                    getInPhasesUptoAndIncludingPostDispatch());
                    break;
                }
                case PhaseMetadata.OUT_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(((AxisConfigurationImpl) axisConfig).getOutFlow());
                    break;
                }
                case PhaseMetadata.FAULT_IN_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(axisConfig.getInFaultFlow());
                    break;
                }
                case PhaseMetadata.FAULT_OUT_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(((AxisConfigurationImpl) axisConfig).getOutFaultFlow());
                    break;
                }
            }
            ////////////////////////////////////////////////////////////////////////////////////
            /////////////////// Modules refered by axis2.xml //////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////
            switch (type) {
                case PhaseMetadata.IN_FLOW:
                {
                    flow = module.getInFlow();
                    break;
                }
                case PhaseMetadata.OUT_FLOW:
                {
                    flow = module.getOutFlow();
                    break;
                }
                case PhaseMetadata.FAULT_IN_FLOW:
                {
                    flow = module.getFaultInFlow();
                    break;
                }
                case PhaseMetadata.FAULT_OUT_FLOW:
                {
                    flow = module.getFaultOutFlow();
                    break;
                }
            }
            if (flow != null) {
                for (int j = 0; j < flow.getHandlerCount(); j++) {
                    HandlerDescription metadata = flow.getHandler(j);
                    if (PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())) {
                        phaseHolder.addHandler(metadata);
                    } else {
                        /**
                         * These handlers will go to operation's handler chains , since the module
View Full Code Here


    }


    public void engageModuleToOperation(OperationDescription operation,
                                        ModuleDescription module) throws PhaseException {
        Flow flow = null;
        for (int type = 1; type < 5; type++) {
            switch (type) {
                case PhaseMetadata.IN_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(operation.getRemainingPhasesInFlow());
                    break;
                }
                case PhaseMetadata.OUT_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(operation.getPhasesOutFlow());
                    break;
                }
                case PhaseMetadata.FAULT_IN_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(operation.getPhasesInFaultFlow());
                    break;
                }
                case PhaseMetadata.FAULT_OUT_FLOW:
                {
                    phaseHolder =
                            new PhaseHolder(operation.getPhasesOutFaultFlow());
                    break;
                }
            }

            switch (type) {
                case PhaseMetadata.IN_FLOW:
                {
                    flow = module.getInFlow();
                    break;
                }
                case PhaseMetadata.OUT_FLOW:
                {
                    flow = module.getOutFlow();
                    break;
                }
                case PhaseMetadata.FAULT_IN_FLOW:
                {
                    flow = module.getFaultInFlow();
                    break;
                }
                case PhaseMetadata.FAULT_OUT_FLOW:
                {
                    flow = module.getFaultOutFlow();
                    break;
                }
            }
            if (flow != null) {
                for (int j = 0; j < flow.getHandlerCount(); j++) {
                    HandlerDescription metadata = flow.getHandler(j);
                    if (!PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())) {
                        phaseHolder.addHandler(metadata);
                    } else {
                        throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.SERVICE_MODULE_CAN_NOT_REFER_GLOBAL_PHASE,
                                metadata.getRules().getPhaseName()));
View Full Code Here

        Class.forName("Echo2", true, cl);
        assertNotNull(service.getName());
        //no style for the service
        //   assertEquals(service.getStyle(),"rpc");

        Flow flow = service.getFaultInFlow();
        assertTrue(flow.getHandlerCount() > 0);
        flow = service.getInFlow();
        assertTrue(flow.getHandlerCount() > 0);
        flow = service.getOutFlow();
        assertTrue(flow.getHandlerCount() > 0);
        assertNotNull(service.getParameter("para2"));

        OperationDescription op = service.getOperation(new QName("opname"));
        assertNotNull(op);
View Full Code Here

     *
     * @param axisService
     * @throws org.apache.axis2.AxisFault
     */
    private void loadServiceProperties(ServiceDescription axisService) throws AxisFault {
        Flow inflow = axisService.getInFlow();
        if (inflow != null) {
            addFlowHandlers(inflow);
        }

        Flow outFlow = axisService.getOutFlow();
        if (outFlow != null) {
            addFlowHandlers(outFlow);
        }

        Flow faultInFlow = axisService.getFaultInFlow();
        if (faultInFlow != null) {
            addFlowHandlers(faultInFlow);
        }

        Flow faultOutFlow = axisService.getFaultOutFlow();
        if (faultOutFlow != null) {
            addFlowHandlers(faultOutFlow);
        }
        // axisService.setClassLoader(currentArchiveFile.getClassLoader());
    }
View Full Code Here

    }


    private void addNewModule(ModuleDescription modulemetadata) throws AxisFault {
        // currentArchiveFile.setClassLoader();
        Flow inflow = modulemetadata.getInFlow();
        if (inflow != null) {
            addFlowHandlers(inflow);
        }
        Flow outFlow = modulemetadata.getOutFlow();
        if (outFlow != null) {
            addFlowHandlers(outFlow);
        }
        Flow faultInFlow = modulemetadata.getFaultInFlow();
        if (faultInFlow != null) {
            addFlowHandlers(faultInFlow);
        }

        Flow faultOutFlow = modulemetadata.getFaultOutFlow();
        if (faultOutFlow != null) {
            addFlowHandlers(faultOutFlow);
        }
        loadModuleClass(modulemetadata);
        axisConfig.addModule(modulemetadata);
View Full Code Here

            currentArchiveFile = new ArchiveFileData(modulearchive, MODULE);
            axismodule = new ModuleDescription();
            ArchiveReader archiveReader = new ArchiveReader();
            archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, axismodule,false);
            currentArchiveFile.setClassLoader(false);
            Flow inflow = axismodule.getInFlow();
            if (inflow != null) {
                addFlowHandlers(inflow);
            }
            Flow outFlow = axismodule.getOutFlow();
            if (outFlow != null) {
                addFlowHandlers(outFlow);
            }
            Flow faultInFlow = axismodule.getFaultInFlow();
            if (faultInFlow != null) {
                addFlowHandlers(faultInFlow);
            }
            Flow faultOutFlow = axismodule.getFaultOutFlow();
            if (faultOutFlow != null) {
                addFlowHandlers(faultOutFlow);
            }
            loadModuleClass(axismodule);
        } catch (AxisFault axisFault) {
View Full Code Here

     * @return Returns Flow.
     * @throws DeploymentException <code>DeploymentException</code>
     */
    protected Flow processFlow(OMElement flowelement, ParameterInclude parent)
            throws DeploymentException {
        Flow flow = new Flow();

        if (flowelement == null) {
            return flow;
        }

        Iterator handlers = flowelement.getChildrenWithName(new QName(
                TAG_HANDLER));

        while (handlers.hasNext()) {
            OMElement handlerElement = (OMElement) handlers.next();

            flow.addHandler(processHandler(handlerElement, parent));
        }

        return flow;
    }
View Full Code Here

    }

    public static void addNewModule(AxisModule modulemetadata,
                                    AxisConfiguration axisConfiguration) throws AxisFault {

        Flow inflow = modulemetadata.getInFlow();
        ClassLoader moduleClassLoader = modulemetadata.getModuleClassLoader();

        if (inflow != null) {
            Utils.addFlowHandlers(inflow, moduleClassLoader);
        }

        Flow outFlow = modulemetadata.getOutFlow();

        if (outFlow != null) {
            Utils.addFlowHandlers(outFlow, moduleClassLoader);
        }

        Flow faultInFlow = modulemetadata.getFaultInFlow();

        if (faultInFlow != null) {
            Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
        }

        Flow faultOutFlow = modulemetadata.getFaultOutFlow();

        if (faultOutFlow != null) {
            Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
        }
View Full Code Here

                    config.isChildFirstClassLoading());
            axismodule.setModuleClassLoader(currentDeploymentFile.getClassLoader());
            archiveReader.readModuleArchive(currentDeploymentFile, axismodule,
                    false, config);
            ClassLoader moduleClassLoader = axismodule.getModuleClassLoader();
            Flow inflow = axismodule.getInFlow();

            if (inflow != null) {
                Utils.addFlowHandlers(inflow, moduleClassLoader);
            }

            Flow outFlow = axismodule.getOutFlow();

            if (outFlow != null) {
                Utils.addFlowHandlers(outFlow, moduleClassLoader);
            }

            Flow faultInFlow = axismodule.getFaultInFlow();

            if (faultInFlow != null) {
                Utils.addFlowHandlers(faultInFlow, moduleClassLoader);
            }

            Flow faultOutFlow = axismodule.getFaultOutFlow();

            if (faultOutFlow != null) {
                Utils.addFlowHandlers(faultOutFlow, moduleClassLoader);
            }
        } catch (AxisFault axisFault) {
View Full Code Here

    private void engageModuleToOperation(AxisOperation axisOperation,
                                         AxisModule axisModule,
                                         int flowType) throws PhaseException {
        List phases = new ArrayList();
        Flow flow = null;
        switch (flowType) {
            case PhaseMetadata.IN_FLOW : {
                phases.addAll(axisConfig.getInFlowPhases());
                phases.addAll(axisOperation.getRemainingPhasesInFlow());
                flow = axisModule.getInFlow();
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.Flow

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.