Package org.apache.axis2.deployment.util

Examples of org.apache.axis2.deployment.util.PhasesInfo


    }


    public void processListPhases(HttpServletRequest req, HttpServletResponse res)
            throws IOException, ServletException {
        PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
        req.getSession().setAttribute(Constants.PHASE_LIST, info);
        renderView(LIST_PHASES_JSP_NAME, req, res);
    }
View Full Code Here


      processMessages(messages, op_descrip);

      // setting Operation phase
      if (axisConfig != null) {
        PhasesInfo info = axisConfig.getPhasesInfo();

        info.setOperationPhases(op_descrip);
      }
      Iterator moduleConfigs = operation.getChildrenWithName(new QName(
          TAG_MODULE_CONFIG));
      processOperationModuleConfig(moduleConfigs, op_descrip, op_descrip);
      // adding the operation
View Full Code Here

        Interface intf = (Interface) idl.getInterfaces().get(interfaceName);
        Operation[] operations = intf.getOperations();

        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < operations.length; i++) {
            Operation corbaOperation = operations[i];
            String opName = corbaOperation.getName();
            if (excludeOperations != null && excludeOperations.contains(opName)) {
                continue;
            }
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the operation there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
                    QName complexSchemaType = table.getComplexSchemaType(opName);
                    inMessage.setElementQName(complexSchemaType);
                    if (complexSchemaType != null) {
                        axisService.addMessageElementQNameToOperationMapping(complexSchemaType,
                                operation);
                    }
                }
                DataType returnType = corbaOperation.getReturnType();
                if (returnType != null && !CorbaUtil.getQualifiedName(returnType).equals(VOID)) {
                    AxisMessage outMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    QName qNamefortheType = table.getQNamefortheType(opName + RESPONSE);
                    outMessage.setElementQName(qNamefortheType);
                    if (qNamefortheType != null) {
                        axisService.addMessageElementQNameToOperationMapping(qNamefortheType, operation);
                    }
                    outMessage.setName(opName + RESPONSE);
                }
                if (corbaOperation.hasRaises()) {
                    List extypes = corbaOperation.getRaises();
                    for (int j = 0; j < extypes.size(); j++) {
                        AxisMessage faultMessage = new AxisMessage();
                        ExceptionType extype = (ExceptionType) extypes.get(j);
                        String exname = extype.getName() ;
                        if(extypes.size()>1){
                            faultMessage.setName(opName + FAULT + j);
                        } else{
                            faultMessage.setName(opName + FAULT);
                        }
                        faultMessage.setElementQName(
                                table.getComplexSchemaType(exname + FAULT));
                        operation.setFaultMessages(faultMessage);
                    }

                }
            } else {
                operation = getAxisOperationforCorbaOperation(corbaOperation, table);
                MessageReceiver mr = axisService.getMessageReceiver(
                        operation.getMessageExchangePattern());
                if (mr != null) {
                    operation.setMessageReceiver(mr);
                } else {
                    mr = axisConfig.getMessageReceiver(operation.getMessageExchangePattern());
                    operation.setMessageReceiver(mr);
                }
                pinfo.setOperationPhases(operation);
                axisService.addOperation(operation);
            }
            if (operation.getInputAction() == null) {
                operation.setSoapAction("urn:" + opName);
            }
View Full Code Here

        Interface intf = (Interface) idl.getInterfaces().get(interfaceName);
        Operation[] operations = intf.getOperations();

        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < operations.length; i++) {
            Operation corbaOperation = operations[i];
            String opName = corbaOperation.getName();
            if (excludeOperations != null && excludeOperations.contains(opName)) {
                continue;
            }
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the operation there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
                    QName complexSchemaType = table.getComplexSchemaType(opName);
                    inMessage.setElementQName(complexSchemaType);
                    if (complexSchemaType != null) {
                        axisService.addMessageElementQNameToOperationMapping(complexSchemaType,
                                operation);
                    }
                }
                DataType returnType = corbaOperation.getReturnType();
                if (returnType != null && !CorbaUtil.getQualifiedName(returnType).equals(VOID)) {
                    AxisMessage outMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    QName qNamefortheType = table.getQNamefortheType(opName + RESPONSE);
                    outMessage.setElementQName(qNamefortheType);
                    if (qNamefortheType != null) {
                        axisService.addMessageElementQNameToOperationMapping(qNamefortheType, operation);
                    }
                    outMessage.setName(opName + RESPONSE);
                }
                if (corbaOperation.hasRaises()) {
                    List extypes = corbaOperation.getRaises();
                    for (int j = 0; j < extypes.size(); j++) {
                        AxisMessage faultMessage = new AxisMessage();
                        ExceptionType extype = (ExceptionType) extypes.get(j);
                        String exname = extype.getName() ;
                        if(extypes.size()>1){
                            faultMessage.setName(opName + FAULT + j);
                        } else{
                            faultMessage.setName(opName + FAULT);
                        }
                        faultMessage.setElementQName(
                                table.getComplexSchemaType(exname + FAULT));
                        operation.setFaultMessages(faultMessage);
                    }

                }
            } else {
                operation = getAxisOperationforCorbaOperation(corbaOperation, table);
                MessageReceiver mr = axisService.getMessageReceiver(
                        operation.getMessageExchangePattern());
                if (mr != null) {
                    operation.setMessageReceiver(mr);
                } else {
                    mr = axisConfig.getMessageReceiver(operation.getMessageExchangePattern());
                    operation.setMessageReceiver(mr);
                }
                pinfo.setOperationPhases(operation);
                axisService.addOperation(operation);
            }
            if (operation.getInputAction() == null) {
                operation.setSoapAction("urn:" + opName);
            }
View Full Code Here

                    }
                });
        serviceClassLoader = systemClassLoader;
        moduleClassLoader = systemClassLoader;

        this.phasesinfo = new PhasesInfo();
        targetResolvers = new ArrayList<TargetResolver>();
    }
View Full Code Here

     *
     * @throws org.apache.axis2.deployment.DeploymentException
     *
     */
    public void validateSystemPredefinedPhases() throws DeploymentException {
        PhasesInfo phasesInfo = getPhasesInfo();
        setInPhasesUptoAndIncludingPostDispatch(phasesInfo.getGlobalInflow());
        setInFaultPhases(phasesInfo.getGlobalInFaultPhases());
        setGlobalOutPhase(phasesInfo.getGlobalOutPhaseList());
        setOutFaultPhases(phasesInfo.getOUT_FaultPhases());
    }
View Full Code Here

        res.sendRedirect(VIEW_SERVICE_HANDLERS_JSP_NAME);
    }

    private void listPhases(HttpServletRequest req, HttpServletResponse res) throws IOException {
        ArrayList phaselist = new ArrayList();
        PhasesInfo info = configContext.getAxisConfiguration().getPhasesinfo();
        phaselist.add(info.getINPhases());
        phaselist.add(info.getIN_FaultPhases());
        phaselist.add(info.getOUTPhases());
        phaselist.add(info.getOUT_FaultPhases());

        phaselist.add(info.getOperationInPhases());
        phaselist.add(info.getOperationInFaultPhases());
        phaselist.add(info.getOperationOutPhases());
        phaselist.add(info.getOperationOutFaultPhases());
        req.getSession().setAttribute(Constants.PHASE_LIST, phaselist);
        res.sendRedirect(LIST_PHASES_JSP_NAME);
    }
View Full Code Here

        super.assumeServiceContext(clientHome);
        AxisService axisService = serviceContext.getAxisService();
        axisOperationTemplate = new OutInAxisOperation(new QName("TemplateOperation"));

        AxisConfiguration axisConfiguration = serviceContext.getConfigurationContext().getAxisConfiguration();
        PhasesInfo info = ((AxisConfiguration) axisConfiguration).getPhasesinfo();
        //to set the operation flows
        if (info != null) {
            info.setOperationPhases(axisOperationTemplate);
        }
        axisService.addOperation(axisOperationTemplate);
    }
View Full Code Here

        super.assumeServiceContext(clientHome);
        axisOperationTemplate = new OutOnlyAxisOperation(new QName("TemplateOperation"));
        AxisService axisService = serviceContext.getAxisService();

        AxisConfiguration axisConfiguration = serviceContext.getConfigurationContext().getAxisConfiguration();
        PhasesInfo info = ((AxisConfiguration) axisConfiguration).getPhasesinfo();
        //to set the operation flows
        if (info != null) {
            info.setOperationPhases(axisOperationTemplate);
        }
        axisService.addOperation(axisOperationTemplate);
    }
View Full Code Here

            Iterator modules = operation.getChildrenWithName(
                    new QName(MODULEST));
            processOperationModuleRefs(modules, op_descrip);

            //setting Operation phase
            PhasesInfo info = axisConfig.getPhasesinfo();
            info.setOperationPhases(op_descrip);

            //adding the opeartion
            operations.add(op_descrip);
        }
        return operations;
View Full Code Here

TOP

Related Classes of org.apache.axis2.deployment.util.PhasesInfo

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.