Examples of PhasesInfo


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

    if (soapService.targetNamespace != null && !"".equals(soapService.targetNamespace)) {
      axisService.setTargetNamespace(soapService.targetNamespace);
    }

    JMethod[] method = soapService.schemaGenerator.getMethods();
    PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
    for (int i = 0; i < method.length; i++) {
      JMethod         jmethod   = method[i];
      AxisOperation   operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
      String          mep       = operation.getMessageExchangePattern();
      MessageReceiver mr;

      if (messageReceiverClassMap != null) {       
        if (messageReceiverClassMap.get(mep) != null) {
          Object obj = messageReceiverClassMap.get(mep);
          if (obj instanceof MessageReceiver) {
            mr = (MessageReceiver) obj;
            operation.setMessageReceiver(mr);
          } else {
            Activator.log.error("Object is not an instance of MessageReceiver," +
                                " thus, default MessageReceiver has been set");
            mr = axisConfiguration
              .getMessageReceiver(operation.getMessageExchangePattern());
            operation.setMessageReceiver(mr);
          }
        } else {
          Activator.log.error("Required MessageReceiver couldn't be found," +
                              " thus, default MessageReceiver has been used");
          mr = axisConfiguration
            .getMessageReceiver(operation.getMessageExchangePattern());
          operation.setMessageReceiver(mr);
        }
      } else {
        Activator.log.error("MessageReceiverClassMap couldn't be found," +
                            " thus, default MessageReceiver has been used");
        mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
        operation.setMessageReceiver(mr);
      }
      pinfo.setOperationPhases(operation);
      axisService.addOperation(operation);
    }
    return axisService;
  }
View Full Code Here

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

        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfiguration.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
                // no need to expose , private and protected methods
                continue;
            } else if (excludeOpeartion.contains(jmethod.getSimpleName())) {
                continue;
            }
            AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);
            String mep = operation.getMessageExchangePattern();
            MessageReceiver mr;
            if (messageReceiverClassMap != null) {

                if (messageReceiverClassMap.get(mep) != null) {
                    Object obj = messageReceiverClassMap.get(mep);
                    if (obj instanceof MessageReceiver) {
                        mr = (MessageReceiver) obj;
                        operation.setMessageReceiver(mr);
                    } else {
                        log.error("Object is not an instance of MessageReceiver, thus, default MessageReceiver has been set");
                        mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
                        operation.setMessageReceiver(mr);
                    }
                } else {
                    log.error("Required MessageReceiver couldn't be found, thus, default MessageReceiver has been used");
                    mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
                    operation.setMessageReceiver(mr);
                }
            } else {
                log.error("MessageRecevierClassMap couldn't be found, thus, default MessageReceiver has been used");
                mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
                operation.setMessageReceiver(mr);
            }
            pinfo.setOperationPhases(operation);
            axisService.addOperation(operation);
        }
        return axisService;

    }
View Full Code Here

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

        }

        JMethod[] method = schemaGenerator.getMethods();
        TypeTable table = schemaGenerator.getTypeTable();

        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            if (!jmethod.isPublic()) {
                // no need to expose , private and protected methods
                continue;
            } else if (excludeOpeartion.contains(jmethod.getSimpleName())) {
                continue;
            }
            AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);

            // loading message receivers
            try {
                MessageReceiver messageReceiver = (MessageReceiver) messageReceiverClass.newInstance();
                operation.setMessageReceiver(messageReceiver);
            } catch (IllegalAccessException e) {
                throw new AxisFault("IllegalAccessException occurred during message receiver loading"
                        + e.getMessage());
            } catch (InstantiationException e) {
                throw new AxisFault("InstantiationException occurred during message receiver loading"
                        + e.getMessage());
            }
            pinfo.setOperationPhases(operation);
            axisService.addOperation(operation);
        }
        return axisService;

    }
View Full Code Here

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

    }
    if (targetNamespace != null && !"".equals(targetNamespace)) {
      axisService.setTargetNamespace(targetNamespace);
    }
    Method[] method = schemaGenerator.getMethods();
    PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
    for (int i = 0; i < method.length; i++) {
      Method jmethod = method[i];

            String methodName = jmethod.getName();        
           
      AxisOperation operation = axisService.getOperation(new QName(methodName));

      String mep = operation.getMessageExchangePattern();
      MessageReceiver mr;
      if (messageReceiverClassMap != null) {

        if (messageReceiverClassMap.get(mep) != null) {
          Object obj = messageReceiverClassMap.get(mep);
          if (obj instanceof MessageReceiver) {
            mr = (MessageReceiver) obj;
            operation.setMessageReceiver(mr);
          } else {
            log
                .error("Object is not an instance of MessageReceiver, thus, default MessageReceiver has been set");
            mr = axisConfiguration.getMessageReceiver(operation
                .getMessageExchangePattern());
            operation.setMessageReceiver(mr);
          }
        } else {
          log
              .error("Required MessageReceiver couldn't be found, thus, default MessageReceiver has been used");
          mr = axisConfiguration.getMessageReceiver(operation
              .getMessageExchangePattern());
          operation.setMessageReceiver(mr);
        }
      } else {
        log
            .error("MessageRecevierClassMap couldn't be found, thus, default MessageReceiver has been used");
        mr = axisConfiguration.getMessageReceiver(operation
            .getMessageExchangePattern());
        operation.setMessageReceiver(mr);
      }
      pinfo.setOperationPhases(operation);
      axisService.addOperation(operation);
    }

    String endpointName = axisService.getEndpointName();
    if ((endpointName == null || endpointName.length() == 0)
View Full Code Here

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

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

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

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

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

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

     * Processes all the phase orders which are defined in axis2.xml.
     *
     * @param phaserders
     */
    private void processPhaseOrders(Iterator phaserders) throws DeploymentException {
        PhasesInfo info = axisConfig.getPhasesInfo();

        while (phaserders.hasNext()) {
            OMElement phaseOrders = (OMElement) phaserders.next();
            String flowType = phaseOrders.getAttribute(new QName(TAG_TYPE)).getAttributeValue();

            if (TAG_FLOW_IN.equals(flowType)) {
                info.setINPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_IN_FAULT.equals(flowType)) {
                info.setIN_FaultPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_OUT.equals(flowType)) {
                info.setOUTPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_OUT_FAULT.equals(flowType)) {
                info.setOUT_FaultPhases(processPhaseList(phaseOrders));
            }
        }
    }
View Full Code Here

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

        // current state of the code in Synchronus

        // This is the original_configuration_context
        ConfigurationContext cc = axisMsgCtx.getConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        PhasesInfo phasesInfo = ac.getPhasesInfo();

        // setting operation default chains
        if (ac.getService("__ANONYMOUS_SERVICE__") == null) {
            // Lets default be OUT_IN
            OutInAxisOperation outInOperation =
                new OutInAxisOperation(new QName(
                    "__OPERATION_OUT_IN__"));
            AxisService axisAnonymousService =
                new AxisService("__ANONYMOUS_SERVICE__");
            axisAnonymousService.addOperation(outInOperation);
            ac.addService(axisAnonymousService);
            phasesInfo.setOperationPhases(outInOperation);
        }
        ServiceGroupContext sgc = new ServiceGroupContext(cc,
            (AxisServiceGroup) ac.getService("__ANONYMOUS_SERVICE__").getParent());
        ServiceContext sc =
            sgc.getServiceContext(new AxisService("__ANONYMOUS_SERVICE__"));
View Full Code Here

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

        AxisOperation singleOP = new InOutAxisOperation(new QName("invokeTryItProxyService"));
        singleOP.setDocumentation("This operation is a 'passthrough' for all operations in " +
                                  " TryIt proxy service.");
        axisService.addOperation(singleOP);*/
        ProxyMessageReceiver receiver = new ProxyMessageReceiver();
        PhasesInfo phaseInfo = axisConfig.getPhasesInfo();
        for (Iterator i = axisService.getOperations(); i.hasNext();) {
            AxisOperation op = (AxisOperation) i.next();
            op.setMessageReceiver(receiver);
            phaseInfo.setOperationPhases(op);
        }
        AxisServiceGroup serviceGroup;
        synchronized (axisConfig) {
            serviceGroup = axisConfig.getServiceGroup(TRYIT_SG_NAME);
            if (serviceGroup == null) {
View Full Code Here

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

     * Processes all the phase orders which are defined in axis2.xml.
     *
     * @param phaserders
     */
    private void processPhaseOrders(Iterator phaserders) throws DeploymentException {
        PhasesInfo info = axisConfig.getPhasesInfo();

        while (phaserders.hasNext()) {
            OMElement phaseOrders = (OMElement) phaserders.next();
            String flowType = phaseOrders.getAttribute(new QName(TAG_TYPE)).getAttributeValue();

            if (TAG_FLOW_IN.equals(flowType)) {
                info.setINPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_IN_FAULT.equals(flowType)) {
                info.setIN_FaultPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_OUT.equals(flowType)) {
                info.setOUTPhases(processPhaseList(phaseOrders));
            } else if (TAG_FLOW_OUT_FAULT.equals(flowType)) {
                info.setOUT_FaultPhases(processPhaseList(phaseOrders));
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.