Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.TerminateSequence


    MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();

    // Processing the terminate message
    // TODO Add terminate sequence message logic.
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg
        .getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    if (terminateSequence == null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noTerminateSeqPart);
      log.debug(message);
      throw new SandeshaException(message);
    }

    String sequenceId = terminateSequence.getIdentifier().getIdentifier();
    if (sequenceId == null || "".equals(sequenceId)) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.invalidSequenceID, null);
      log.debug(message);
      throw new SandeshaException(message);
    }
View Full Code Here


    getConfigurationContext().registerOperationContext(rmMsgCtx.getMessageId(),  opcontext);

    getMsgContext().setOperationContext(opcontext);
    getMsgContext().setAxisOperation(terminateOp);

    TerminateSequence terminateSequencePart = (TerminateSequence) rmMsgCtx
        .getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    terminateSequencePart.getIdentifier().setIndentifer(getOutSequenceID());

    rmMsgCtx.setWSAAction(SpecSpecificConstants.getTerminateSequenceAction(getRMVersion()));
    rmMsgCtx.setSOAPAction(SpecSpecificConstants.getTerminateSequenceSOAPAction(getRMVersion()));
   
    rmsBean.setTerminateAdded(true);
View Full Code Here

          //InFlow of the reference message get called which could be zero sized (OutOnly operations).
         
          // terminate sending side if this is the WSRM 1.0 spec.
          // If the WSRM versoion is 1.1 termination will happen in the terminate sequence response message.
         
          TerminateSequence terminateSequence = rmMsgCtx.getTerminateSequence();
          String sequenceID = terminateSequence.getIdentifier().getIdentifier();
 
          RMSBean rmsBean = SandeshaUtil.getRMSBeanFromSequenceId(storageManager, sequenceID);
          TerminateManager.terminateSendingSide(rmsBean, storageManager, false, null);
         
          if(transaction != null && transaction.isActive()) transaction.commit();
View Full Code Here

        rmMsgContext.setSequence(sequence);
       
      }
     
    } else if(messageType == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
      TerminateSequence terminate = rmMsgContext.getTerminateSequence();
      id = terminate.getIdentifier();

    } else if(messageType == Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE) {
      CloseSequence close = rmMsgContext.getCloseSequence();
      id = close.getIdentifier();
   
View Full Code Here

        }

        Transaction terminateCleaningTransaction = storageManager.getTransaction();
        if (rmMsgCtx.getMessageType() == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
          // terminate sending side.
          TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
          String sequenceID = terminateSequence.getIdentifier().getIdentifier();
          ConfigurationContext configContext = msgCtx.getConfigurationContext();
         
          String internalSequenceID = SandeshaUtil.getSequenceProperty(sequenceID,Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID,configContext);
          TerminateManager.terminateSendingSide(configContext,internalSequenceID, msgCtx.isServerSide());
        }
View Full Code Here

      ackProcessor.processInMessage(terminateSeqRMMsg);
    }
   
    //Processing the terminate message
    //TODO Add terminate sequence message logic.
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    if (terminateSequence==null) {
      String message = "Terminate Sequence part is not available";
      log.debug(message);
      throw new SandeshaException (message);
    }
   
    String sequenceId = terminateSequence.getIdentifier().getIdentifier();
    if (sequenceId==null || "".equals(sequenceId)) {
      String message = "Invalid sequence id";
      log.debug(message);
      throw new SandeshaException (message);
    }
View Full Code Here

      String message = "Terminate was added previously.";
      log.info(message);
      return;
    }

    TerminateSequence terminateSequencePart = (TerminateSequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    terminateSequencePart.getIdentifier().setIndentifer(outSequenceID);
   
    rmMsgCtx.setFlow(MessageContext.OUT_FLOW);
    msgContext.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE,"true");
   
    rmMsgCtx.setTo(new EndpointReference(toAddress));
View Full Code Here

      factory = new SOAP11Factory ();
      dummyEnvelope = factory.getDefaultEnvelope();
    }
   
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);
    TerminateSequence terminateSequence = new TerminateSequence (factory,rmNamespaceValue);
    Identifier identifier = new Identifier (factory,rmNamespaceValue);
    identifier.setIndentifer(sequenceID);
    terminateSequence.setIdentifier(identifier);
    terminateSequence.toSOAPEnvelope(dummyEnvelope);
   
    return dummyEnvelope;
  }
View Full Code Here

    }
   
    SOAPEnvelope envelope = factory.getDefaultEnvelope();
    terminateRMMessage.setSOAPEnvelop(envelope);
   
    TerminateSequence terminateSequencePart = new TerminateSequence(factory,rmNamespaceValue);
    Identifier identifier = new Identifier(factory,rmNamespaceValue);
    identifier.setIndentifer(sequenceId);
    terminateSequencePart.setIdentifier(identifier);
    terminateRMMessage.setMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ,
        terminateSequencePart);

    finalizeCreation(referenceMessage, terminateMessage);
View Full Code Here

    ConfigurationContext configurationContext = terminateSeqRMMsg.getMessageContext().getConfigurationContext();
   
    SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil
        .getSOAPVersion(terminateSeqRMMsg.getSOAPEnvelope()));
   
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    String sequenceID = terminateSequence.getIdentifier().getIdentifier();
   
    String namespace = terminateSeqRMMsg.getRMNamespaceValue();
    terminateSeqResponseRMMsg.setRMNamespaceValue(namespace);
   
    TerminateSequenceResponse terminateSequenceResponse = new TerminateSequenceResponse (factory,namespace);
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.wsrm.TerminateSequence

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.