Examples of TerminateSequence


Examples of org.apache.sandesha2.wsrm.TerminateSequence

          //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

Examples of org.apache.sandesha2.wsrm.TerminateSequence

        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

Examples of org.apache.sandesha2.wsrm.TerminateSequence

    String sequenceID = null;

    CreateSequence createSequence = rmMsgContext.getCreateSequence();
    CreateSequenceResponse createSequenceResponse = rmMsgContext.getCreateSequenceResponse();
    TerminateSequence terminateSequence = rmMsgContext.getTerminateSequence();
    TerminateSequenceResponse terminateSequenceResponse = rmMsgContext.getTerminateSequenceResponse();
    Iterator<SequenceAcknowledgement> sequenceAcknowledgementsIter = rmMsgContext.getSequenceAcknowledgements();
    Sequence sequence = rmMsgContext.getSequence();
    Iterator<AckRequested> ackRequestedIter = rmMsgContext.getAckRequests();
    CloseSequence closeSequence = rmMsgContext.getCloseSequence();
    CloseSequenceResponse closeSequenceResponse = rmMsgContext.getCloseSequenceResponse();
    MakeConnection makeConnection = rmMsgContext.getMakeConnection();
   
    String rmNamespace = null;

    if (createSequence != null) {
      rmNamespace = createSequence.getNamespaceValue();
    }

    if (createSequenceResponse != null) {
      rmNamespace = createSequenceResponse.getNamespaceValue();
    }

    if (sequence != null) {
      rmNamespace = sequence.getNamespaceValue();
    }

    //In case of ack messages RM Namespace is decided based on the sequenceId of the last
    //sequence Ack. In other words Sandesha2 does not expect to receive two SequenceAcknowledgements
    //of different RM specifications in the same incoming message
    while(sequenceAcknowledgementsIter.hasNext()){
      SequenceAcknowledgement sequenceAck = (SequenceAcknowledgement) sequenceAcknowledgementsIter.next();
      rmNamespace = sequenceAck.getNamespaceValue();
    }

    if (terminateSequence != null) {
      rmNamespace = terminateSequence.getNamespaceValue();
    }

    if (terminateSequenceResponse != null) {
      rmNamespace = terminateSequenceResponse.getNamespaceValue();
    }

    //In case of ack request messages RM Namespace is decided based on the sequenceId of the last
    //ack request.
    while(ackRequestedIter.hasNext()){
      AckRequested ackRequest = (AckRequested) ackRequestedIter.next();
      rmNamespace = ackRequest.getNamespaceValue();
    }

    if (closeSequence != null) {
      rmNamespace = closeSequence.getNamespaceValue();
    }

    if (closeSequenceResponse != null) {
      rmNamespace = closeSequenceResponse.getNamespaceValue();
    }
   
    if (makeConnection != null) {
      if (Sandesha2Constants.SPEC_2007_02.MC_NS_URI.equals(makeConnection.getNamespaceValue()))
        rmNamespace = Sandesha2Constants.SPEC_2007_02.NS_URI;
    }
   
    if (rmMsgContext.getMessagePending() != null) {
      //MessagePending only supported in 1.1 namespace... no need to check the namespace value
      rmNamespace = Sandesha2Constants.SPEC_2007_02.NS_URI;
    }
    if (rmNamespace!=null)
      rmMsgContext.setRMNamespaceValue(rmNamespace);
     
    sequenceAcknowledgementsIter = rmMsgContext.getSequenceAcknowledgements();
    ackRequestedIter = rmMsgContext.getAckRequests();
   
    // Setting message type.
    if (createSequence != null) {
      rmMsgContext.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ);
    } else if (createSequenceResponse != null) {
      rmMsgContext.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ_RESPONSE);
      sequenceID = createSequenceResponse.getIdentifier().getIdentifier();
    } else if (terminateSequence != null) {
      rmMsgContext.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ);
      sequenceID = terminateSequence.getIdentifier().getIdentifier();
    } else if (terminateSequenceResponse != null) {
      rmMsgContext.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ_RESPONSE);
      sequenceID = terminateSequenceResponse.getIdentifier().getIdentifier();
    } else if (sequence != null) {
     
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequence

          closeSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.CloseSequenceResponse.equals(firstBodyQName)) {
          closeSequenceResponse = new CloseSequenceResponse(namespace);
          closeSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2007_02.QNames.TerminateSequence.equals(firstBodyQName)) {
          terminateSequence = new TerminateSequence(namespace);
          terminateSequence.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.TerminateSequence.equals(firstBodyQName)) {
          terminateSequence = new TerminateSequence(namespace);
          terminateSequence.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2007_02.QNames.TerminateSequenceResponse.equals(firstBodyQName)) {
          terminateSequenceResponse = new TerminateSequenceResponse(namespace);
          terminateSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.TerminateSequenceResponse.equals(firstBodyQName)) {
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequence

    MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();

    // Processing the terminate message
    // TODO Add terminate sequence message logic.
    TerminateSequence terminateSequence = terminateSeqRMMsg.getTerminateSequence();
    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

Examples of org.apache.sandesha2.wsrm.TerminateSequence

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

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

    TerminateSequence terminateSequencePart = rmMsgCtx.getTerminateSequence();
    terminateSequencePart.getIdentifier().setIndentifer(getOutSequenceID());

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

Examples of org.apache.sandesha2.wsrm.TerminateSequence

      factory = new SOAP11Factory();
      dummyEnvelope = factory.getDefaultEnvelope();
    }

    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);
    TerminateSequence terminateSequence = new TerminateSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(sequenceID);
    terminateSequence.setIdentifier(identifier);
    if(TerminateSequence.isLastMsgNumberRequired(rmNamespaceValue)){
      try
      {
        transaction = storageManager.getTransaction();
        LastMessageNumber lastMessageNumber = new LastMessageNumber(rmNamespaceValue);
        lastMessageNumber.setMessageNumber(SandeshaUtil.getLastMessageNumber(internalSequenceID, storageManager));
        terminateSequence.setLastMessageNumber(lastMessageNumber);
      }
      finally
      {
        // Commit the tran whatever happened
        if(transaction != null) transaction.commit();
      }
    }
    terminateSequence.toSOAPEnvelope(dummyEnvelope);

    return dummyEnvelope;
  }
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequence

          closeSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.CloseSequenceResponse.equals(firstBodyQName)) {
          closeSequenceResponse = new CloseSequenceResponse(namespace);
          closeSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2007_02.QNames.TerminateSequence.equals(firstBodyQName)) {
          terminateSequence = new TerminateSequence(namespace);
          terminateSequence.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.TerminateSequence.equals(firstBodyQName)) {
          terminateSequence = new TerminateSequence(namespace);
          terminateSequence.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2007_02.QNames.TerminateSequenceResponse.equals(firstBodyQName)) {
          terminateSequenceResponse = new TerminateSequenceResponse(namespace);
          terminateSequenceResponse.fromOMElement(body);
        } else if(Sandesha2Constants.SPEC_2005_02.QNames.TerminateSequenceResponse.equals(firstBodyQName)) {
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequence

    }

    SOAPEnvelope envelope = factory.getDefaultEnvelope();
    terminateRMMessage.setSOAPEnvelop(envelope);

    TerminateSequence terminateSequencePart = new TerminateSequence(factory);
    Identifier identifier = new Identifier(factory);
    identifier.setIndentifer(sequenceId);
    terminateSequencePart.setIdentifier(identifier);
    terminateRMMessage.setMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ,
        terminateSequencePart);

    return terminateRMMessage;
  }
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequence

      ackProcessor.processMessage(terminateSeqRMMSg);
    }

    //Processing the terminate message
    //TODO Add terminate sequence message logic.
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMSg.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    if (terminateSequence==null)
      throw new SandeshaException ("Terminate Sequence part is not available");
   
    String sequenceId = terminateSequence.getIdentifier().getIdentifier();
    if (sequenceId==null || "".equals(sequenceId))
      throw new SandeshaException ("Invalid sequence id");
   
    ConfigurationContext context = terminateSeqMsg.getConfigurationContext();
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.