Examples of TerminateSequenceResponse


Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse

    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) {
     
      Sequence seq = rmMsgContext.getSequence();
      boolean lastMessage = seq.getLastMessage();
      SOAPEnvelope envelope = rmMsgContext.getSOAPEnvelope();
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse

          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)) {
          terminateSequenceResponse = new TerminateSequenceResponse(namespace);
          terminateSequenceResponse.fromOMElement(body);
        }
      }else if(Sandesha2Constants.SPEC_2007_02.QNames.MakeConnection.equals(firstBodyQName)) {
        makeConnection = new MakeConnection();
        makeConnection.fromOMElement(firstBodyElement);
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse

    MessageContext msgContext = terminateResRMMsg.getMessageContext();
    ConfigurationContext context = terminateResRMMsg.getConfigurationContext();
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context,context.getAxisConfiguration());
   
    TerminateSequenceResponse tsResponse = terminateResRMMsg.getTerminateSequenceResponse();
   
    String sequenceId = tsResponse.getIdentifier().getIdentifier();
    RMSBean rmsBean = SandeshaUtil.getRMSBeanFromSequenceId(storageManager, sequenceId);
   
    //check security credentials
    SandeshaUtil.assertProofOfPossession(rmsBean, msgContext, msgContext.getEnvelope().getBody());
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse

          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)) {
          terminateSequenceResponse = new TerminateSequenceResponse(namespace);
          terminateSequenceResponse.fromOMElement(body);
        }
      }else if(Sandesha2Constants.SPEC_2007_02.QNames.MakeConnection.equals(firstBodyQName)) {
        makeConnection = new MakeConnection();
        makeConnection.fromOMElement(firstBodyElement);
View Full Code Here

Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse

    ConfigurationContext context = terminateResRMMsg.getConfigurationContext();
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context,context.getAxisConfiguration());
    SequencePropertyBeanMgr sequencePropertyBeanMgr = storageManager.getSequencePropertyBeanMgr();
   
    TerminateSequenceResponse tsResponse = (TerminateSequenceResponse)
      terminateResRMMsg.getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
   
    String sequenceId = tsResponse.getIdentifier().getIdentifier();
    String internalSequenceID = SandeshaUtil.getSequenceProperty(sequenceId,
        Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID, storageManager);
    msgContext.setProperty(Sandesha2Constants.MessageContextProperties.INTERNAL_SEQUENCE_ID,internalSequenceID);
    String sequencePropertyKey = SandeshaUtil.getSequencePropertyKey(terminateResRMMsg);
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.