Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisOperation


          OperationContext responseMsgOpCtx = requestMsgOpCtx;
          if (requestMsgOpCtx.getAxisOperation().getMessageReceiver() == null) {
            // Generate a new RM In Only operation

            ServiceContext serviceCtx = responseMessageContext.getServiceContext();
            AxisOperation op = msgCtx.getAxisService().getOperation(Sandesha2Constants.RM_IN_ONLY_OPERATION);
            responseMsgOpCtx = ContextFactory.createOperationContext (op, serviceCtx);         

          }
         
          responseMessageContext.setOperationContext(responseMsgOpCtx);
        }
       
        AxisOperation operation = msgCtx.getAxisOperation();
        if (operation!=null && responseMessageContext.getAxisMessage()==null
            && (operation instanceof OutInAxisOperation))
          responseMessageContext.setAxisMessage(operation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE));

        RMMsgContext responseRMMessage = MsgInitializer.initializeMessage(responseMessageContext);
        if (responseRMMessage.getMessageType()==Sandesha2Constants.MessageTypes.ACK) {
          responseMessageContext.setAxisOperation(SpecSpecificConstants.getWSRMOperation
              (Sandesha2Constants.MessageTypes.ACK, responseRMMessage.getRMSpecVersion(), responseMessageContext.getAxisService()));
View Full Code Here


  private static void setUpServiceClientAnonymousOperations (ServiceClient serviceClient) throws SandeshaException {
    try {
     
      AxisService service = serviceClient.getAxisService();

      AxisOperation anonOutOnlyOperation = service.getOperation(ServiceClient.ANON_OUT_ONLY_OP);
     
      if (anonOutOnlyOperation==null) {
        anonOutOnlyOperation = AxisOperationFactory.getAxisOperation(WSDLConstants.MEP_CONSTANT_OUT_ONLY);
        anonOutOnlyOperation.setName(ServiceClient.ANON_OUT_ONLY_OP);
       
        AxisOperation referenceOperation = service.getOperation(Sandesha2Constants.RM_IN_ONLY_OPERATION);
       
        if (referenceOperation!=null) {
          anonOutOnlyOperation.setPhasesOutFlow(referenceOperation.getPhasesOutFlow());
          anonOutOnlyOperation.setPhasesOutFaultFlow(referenceOperation.getPhasesOutFaultFlow());
          anonOutOnlyOperation.setPhasesInFaultFlow(referenceOperation.getPhasesInFaultFlow());
          anonOutOnlyOperation.setPhasesInFaultFlow(referenceOperation.getRemainingPhasesInFlow());

          service.addOperation(anonOutOnlyOperation);
        } else {
          String message = "Cant find RM Operations. Please engage the Sandesha2 module before doing the invocation.";
          throw new SandeshaException (message);
        }
      }

      AxisOperation anonOutInOperation = service.getOperation(ServiceClient.ANON_OUT_IN_OP);
     
      if (anonOutInOperation==null) {
        anonOutInOperation = AxisOperationFactory.getAxisOperation(WSDLConstants.MEP_CONSTANT_OUT_IN);
        anonOutInOperation.setName(ServiceClient.ANON_OUT_IN_OP);
       
        AxisOperation referenceOperation = service.getOperation(Sandesha2Constants.RM_IN_OUT_OPERATION);
       
        if (referenceOperation!=null) {
          anonOutInOperation.setPhasesOutFlow(referenceOperation.getPhasesOutFlow());
          anonOutInOperation.setPhasesOutFaultFlow(referenceOperation.getPhasesOutFaultFlow());
          anonOutInOperation.setPhasesInFaultFlow(referenceOperation.getPhasesInFaultFlow());
          anonOutInOperation.setPhasesInFaultFlow(referenceOperation.getRemainingPhasesInFlow());
         
          //operation will be added to the service only if a valid referenceOperation was found.
          service.addOperation(anonOutInOperation);
        }
      }
View Full Code Here

    if (rmsBean!=null && rmsBean.getLastOutMessage()<=0) {
      //there is a RMS sequence without a LastMsg entry
     
      MessageContext msgContext = rmMsgCtx.getMessageContext();
     
      AxisOperation operation = SpecSpecificConstants.getWSRMOperation(Sandesha2Constants.MessageTypes.LAST_MESSAGE,
          rmMsgCtx.getRMSpecVersion() , msgContext.getAxisService());
      MessageContext outMessageContext = SandeshaUtil.createNewRelatedMessageContext(rmMsgCtx, operation);
     
      outMessageContext.setServerSide(true);
     
View Full Code Here

    //write into the sequence proeprties that the client is now closed
    getRMSBean().setSequenceClosedClient(true);
    getStorageManager().getRMSBeanMgr().update(getRMSBean());

    AxisOperation closeOperation = SpecSpecificConstants.getWSRMOperation(
        Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE,
        rmMsgCtx.getRMSpecVersion(),
        rmMsgCtx.getMessageContext().getAxisService());
    getMsgContext().setAxisOperation(closeOperation);
View Full Code Here

        else {
          if (log.isDebugEnabled())
            log.debug("Detected duplicate message " + msgNo);
          rmMsgCtx.getMessageContext().setRelationships(null);
          // Add the duplicate RM AxisOperation to the message
          AxisOperation duplicateMessageOperation = SpecSpecificConstants.getWSRMOperation(
              Sandesha2Constants.MessageTypes.DUPLICATE_MESSAGE,
              Sandesha2Constants.SPEC_VERSIONS.v1_0,
              rmMsgCtx.getMessageContext().getAxisService());
          rmMsgCtx.getMessageContext().setAxisOperation(duplicateMessageOperation);
        }
             
      } else {
        if (log.isDebugEnabled())
          log.debug("Detected message for no sequence " + msgNo);
        rmMsgCtx.getMessageContext().setRelationships(null);
        // Add the duplicate RM AxisOperation to the message
        AxisOperation duplicateMessageOperation = SpecSpecificConstants.getWSRMOperation(
            Sandesha2Constants.MessageTypes.DUPLICATE_MESSAGE,
            Sandesha2Constants.SPEC_VERSIONS.v1_0,
            rmMsgCtx.getMessageContext().getAxisService());
        rmMsgCtx.getMessageContext().setAxisOperation(duplicateMessageOperation);
      }
View Full Code Here

                }
              }
            }

            //checking weather the module is engaged at the Operation level
            AxisOperation operation = messageContext.getAxisOperation();
            if (operation!=null) {
              Collection modules = operation.getEngagedModules();
              for (Iterator iter = modules.iterator();iter.hasNext();) {
                AxisModule module = (AxisModule) iter.next();
                String name = module.getName();
                if (name!=null && name.startsWith (Sandesha2Constants.MODULE_NAME)) {
                  engaged = true;
View Full Code Here

    // well, and and we only want to consider the user's operations.
    if(axisDescription instanceof AxisService) {
      AxisService service = (AxisService) axisDescription;
      Iterator ops = service.getOperations();
      while(ops.hasNext()) {
        AxisOperation op = (AxisOperation) ops.next();
        log.debug("Examining operation " + op.getName() + ", mep " + op.getMessageExchangePattern());

        String name = null;
        QName qName = op.getName();
        if(qName != null) name = qName.getLocalPart();
        if((name != null && name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) ||
           ServiceClient.ANON_OUT_IN_OP.equals(qName))
          break;

        // If we get to here then we must have one of the user's operations, so
        // check the MEP.
        if(op.getAxisSpecifMEPConstant() == WSDLConstants.MEP_CONSTANT_OUT_IN) {
          Parameter p = new Parameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS, Boolean.TRUE);
          service.addParameter(p);
          break;
        }
      }
    } else if(axisDescription instanceof AxisOperation) {
      AxisOperation op = (AxisOperation) axisDescription;
      log.debug("Examining operation " + op.getName() + ", mep " + op.getAxisSpecifMEPConstant());

      String name = null;
      QName qName = op.getName();
      if(qName != null) name = qName.getLocalPart();
      if((name != null && !name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) &&
         !ServiceClient.ANON_OUT_IN_OP.equals(qName)) {

        // If we get to here then we must have one of the user's operations, so
        // check the MEP.
        if(op.getAxisSpecifMEPConstant() == WSDLConstants.MEP_CONSTANT_OUT_IN) {
          Parameter p = new Parameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS, Boolean.TRUE);
          op.getParent().addParameter(p);
        }
      }
    }

View Full Code Here

      if (log.isDebugEnabled())
        log.debug("Exit: TerminateSeqMsgProcessor::processOutMessage, sequence previously terminated");
      return true;
    }

    AxisOperation terminateOp = SpecSpecificConstants.getWSRMOperation(
        Sandesha2Constants.MessageTypes.TERMINATE_SEQ,
        rmMsgCtx.getRMSpecVersion(),
        getMsgContext().getAxisService());
 
    OperationContext opcontext = ContextFactory.createOperationContext(terminateOp, getMsgContext().getServiceContext());
View Full Code Here

      String messageStoreKey = tempBean.getMessageContextRefKey();
     
      // Retrieve the message context.
      MessageContext context = storageManager.retrieveMessageContext(messageStoreKey, configCtx);
     
      AxisOperation axisOperation = context.getAxisOperation();
      if (axisOperation != null)
      {
        MessageReceiver msgReceiver = axisOperation.getMessageReceiver();
        if ((msgReceiver != null) && (msgReceiver instanceof CallbackReceiver))
        {
          Callback callback = ((CallbackReceiver)msgReceiver).lookupCallback(context.getMessageID());
          if (callback != null)
          {
View Full Code Here

    if (context == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.configContextNotSet));

    // creating by copying common contents. (this will not set contexts
    // except for configCtx).
    AxisOperation createSequenceOperation = SpecSpecificConstants.getWSRMOperation(
        Sandesha2Constants.MessageTypes.CREATE_SEQ,
        rmsBean.getRMVersion(),
        applicationMsgContext.getAxisService());

    MessageContext createSeqmsgContext = SandeshaUtil
View Full Code Here

TOP

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

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.