Package org.apache.axis2.description

Examples of org.apache.axis2.description.OperationDescription


    }


    public SOAPEnvelope invokeBlockingWithEnvelopeOut(String axisop,
                                                      SOAPEnvelope reqEnvelope) throws AxisFault {
        OperationDescription axisConfig =
                serviceContext.getServiceConfig().getOperation(new QName(axisop));
        if (axisConfig == null) {
            axisConfig = new OperationDescription(new QName(axisop));
            axisConfig.setRemainingPhasesInFlow(operationTemplate.getRemainingPhasesInFlow());
            axisConfig.setPhasesOutFlow(operationTemplate.getPhasesOutFlow());
            axisConfig.setPhasesInFaultFlow(operationTemplate.getPhasesInFaultFlow());
            axisConfig.setPhasesOutFaultFlow(operationTemplate.getPhasesOutFaultFlow());
            serviceContext.getServiceConfig().addOperation(axisConfig);
        }

//        if (axisConfig == null) {
//            axisConfig = new OperationDescription(new QName(axisop));
View Full Code Here


    public ConfigurationContext getEngineContext() {
        return (ConfigurationContext) parent.getParent();
    }

    public OperationContext createOperationContext(QName name) {
        OperationDescription axisOp = serviceConfig.getOperation(name);
        return new OperationContext(axisOp, this);
    }
View Full Code Here

     */
    public void buildchains() throws PhaseException, AxisFault {
        HashMap operations = axisService.getOperations();
        Collection col = operations.values();
        for (Iterator iterator = col.iterator(); iterator.hasNext();) {
            OperationDescription operation = (OperationDescription) iterator.next();
            for (int i = 1; i < 5; i++) {
                buildExcutionChains(i, operation);
            }
        }
    }
View Full Code Here

                                                ModuleDescription module) throws PhaseException {
        HashMap opeartions = service.getOperations();
        Collection opCol = opeartions.values();
        boolean engaged = false;
        for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
            OperationDescription opDesc = (OperationDescription) iterator.next();
            Collection modules = opDesc.getModules();
            for (Iterator iterator1 = modules.iterator();
                 iterator1.hasNext();) {
                ModuleDescription description = (ModuleDescription) iterator1.next();
                if (description.getName().equals(module.getName())) {
                    engaged = true;
                    break;
                }
            }
            if (engaged) {
                continue;
            }
            Flow flow = null;
            for (int type = 1; type < 5; type++) {
                switch (type) {
                    case PhaseMetadata.IN_FLOW:
                    {
                        phaseHolder =
                                new PhaseHolder(opDesc.getRemainingPhasesInFlow());
                        break;
                    }
                    case PhaseMetadata.OUT_FLOW:
                    {
                        phaseHolder =
                                new PhaseHolder(opDesc.getPhasesOutFlow());
                        break;
                    }
                    case PhaseMetadata.FAULT_IN_FLOW:
                    {
                        phaseHolder =
                                new PhaseHolder(opDesc.getPhasesInFaultFlow());
                        break;
                    }
                    case PhaseMetadata.FAULT_OUT_FLOW:
                    {
                        phaseHolder =
                                new PhaseHolder(opDesc.getPhasesOutFaultFlow());
                        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);
                        }
                    }
                }
            }
            opDesc.addToEngageModuleList(module);
        }
    }
View Full Code Here

        HashMap opeartions = service.getOperations();
        Collection opCol = opeartions.values();
        boolean engaged = false;
        service.addModuleOperations(module, axisConfig);
        for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
            OperationDescription opDesc = (OperationDescription) iterator.next();
            Collection modules = opDesc.getModules();
            for (Iterator iterator1 = modules.iterator();
                 iterator1.hasNext();) {
                ModuleDescription description = (ModuleDescription) iterator1.next();
                if (description.getName().equals(module.getName())) {
                    engaged = true;
                    break;
                }
            }
            if (!engaged) {
                engageModuleToOperation(opDesc, module);
                opDesc.addToEngageModuleList(module);
            }
        }
    }
View Full Code Here

        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

     * @see Handler
     */
    public void receive(MessageContext msgContext) throws AxisFault {

        ConfigurationContext sysCtx = msgContext.getSystemContext();
        OperationDescription operationDescription = null;
        ArrayList preCalculatedPhases =
            sysCtx
                .getAxisConfiguration()
                .getInPhasesUptoAndIncludingPostDispatch();
        ArrayList operationSpecificPhases = null;

        if (msgContext.isPaused()) {
            // the message has paused, so rerun them from the position they stoped. The Handler
            //who paused the Message will be the first one to run
            //resume fixed, global precalulated phases
            resumeInvocationPhases(preCalculatedPhases, msgContext);
            verifyContextBuilt(msgContext);
            //resume operation specific phases
            OperationContext operationContext =
                msgContext.getOperationContext();
            operationDescription = operationContext.getAxisOperation();
            operationSpecificPhases =
                operationDescription.getRemainingPhasesInFlow();
            resumeInvocationPhases(operationSpecificPhases, msgContext);
        } else {
            invokePhases(preCalculatedPhases, msgContext);
            verifyContextBuilt(msgContext);
            OperationContext operationContext =
                msgContext.getOperationContext();
            operationDescription = operationContext.getAxisOperation();
            operationSpecificPhases =
                operationDescription.getRemainingPhasesInFlow();
            invokePhases(operationSpecificPhases, msgContext);
        }

        if (msgContext.isServerSide() && !msgContext.isPaused()) {
            // invoke the Message Receivers
            MessageReceiver receiver =
                operationDescription.getMessageReceiver();
            receiver.receive(msgContext);
        }
    }
View Full Code Here

     */
    public void sendFault(MessageContext msgContext) throws AxisFault {
        OperationContext opContext = msgContext.getOperationContext();
        //find and execute the Fault Out Flow Handlers
        if (opContext != null) {
            OperationDescription axisOperation = opContext.getAxisOperation();
            ArrayList phases = axisOperation.getPhasesOutFaultFlow();
            if (msgContext.isPaused()) {
                resumeInvocationPhases(phases, msgContext);
            } else {
                invokePhases(phases, msgContext);
            }
View Full Code Here

            verifyContextBuilt(msgContext);
        }
        opContext = msgContext.getOperationContext();
        //find and execute the Fault In Flow Handlers
        if (opContext != null) {
            OperationDescription axisOperation = opContext.getAxisOperation();
            ArrayList phases = axisOperation.getPhasesInFaultFlow();
            if (msgContext.isPaused()) {
                resumeInvocationPhases(phases, msgContext);
            } else {
                invokePhases(phases, msgContext);
            }
View Full Code Here

                                              MessageContext messageContext)
            throws AxisFault {

        String action = messageContext.getSoapAction();
        if (action != null) {
            OperationDescription op = service.getOperationBySOAPAction(action);
            if (op == null) {
                op = service.getOperation(new QName(action));
            }
            /* HACK: Please remove this when we add support for custom action uri */
            if (op == null && action.lastIndexOf('/')!=-1) {
View Full Code Here

TOP

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

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.