Package org.apache.axis2.description

Examples of org.apache.axis2.description.Flow


     *
     * @param module
     */
    public void disengageModuleFromOperationChain(AxisModule module, AxisOperation operation) {
        //INFLOW
        Flow flow = module.getInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getRemainingPhasesInFlow());
            }
        }
        //OUTFLOW
        flow = module.getOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesOutFlow());
            }
        }
        //INFAULTFLOW
        flow = module.getFaultInFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesInFaultFlow());
            }
        }
        //OUTFAULTFLOW
        flow = module.getFaultOutFlow();
        if (flow != null) {
            for (int j = 0; j < flow.getHandlerCount(); j++) {
                HandlerDescription handler = flow.getHandler(j);
                removeHandlerfromaPhase(handler, operation.getPhasesOutFaultFlow());
            }
        }
    }
View Full Code Here


    protected void setUp() throws Exception {
    }


    public void testFailureAtServerRequestFlow() throws Exception {
        Flow flow = new FlowImpl();
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, culprit,PhaseMetadata.PHASE_POLICY_DETERMINATION);
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

    }

    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

    protected void setUp() throws Exception {
    }


    public void testFailureAtServerRequestFlow() throws Exception {
        Flow flow = new FlowImpl();
        Utils.addHandler(flow,
                new SpeakingHandler(),
                PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow,
                new SpeakingHandler(),
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

     * @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

    //This method calls the init method of the handlers that we want to initialize.
    //Currently only the handlers in the OutFlow and FaultOutFlow are initialized
    //by this code. If handlers in other flows need to be initialized then code will
    //need to be added to do so.
    private void initHandlers(AxisModule axisModule) {
        Flow flow = axisModule.getOutFlow();
        if (log.isTraceEnabled()) {
            log.trace("initHandlers: Initializing handlers in out flow.");
        }
        for (int i = 0, size = flow.getHandlerCount(); i < size; i++) {
            HandlerDescription description = flow.getHandler(i);
            Handler handler = description.getHandler();
            handler.init(description);
        }

        flow = axisModule.getFaultOutFlow();
        if (log.isTraceEnabled()) {
            log.trace("initHandlers: Initializing handlers in fault out flow.");
        }
        for (int i = 0, size = flow.getHandlerCount(); i < size; i++) {
            HandlerDescription description = flow.getHandler(i);
            Handler handler = description.getHandler();
            handler.init(description);
        }
    }
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

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.