Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.UsesSequenceSTR


        rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.APPLICATION);
     
      sequenceID = sequence.getIdentifier().getIdentifier();
    } else if (sequenceAcknowledgementsIter.hasNext()) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.ACK);
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAcknowledgementsIter.next();
     
      //if there is only on sequenceAck, sequenceId will be set. Otherwise it will not be.
      if (!sequenceAcknowledgementsIter.hasNext())
        sequenceID = sequenceAcknowledgement.getIdentifier().getIdentifier();
    } else if (ackRequestedIter.hasNext()) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.ACK_REQUEST);
      AckRequested ackRequest = (AckRequested) ackRequestedIter.next();

      //if there is only on sequenceAck, sequenceId will be set. Otherwise it will not be.
View Full Code Here


    CreateSequence createSequence = (CreateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ);
    CreateSequenceResponse createSequenceResponse = (CreateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
    TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    TerminateSequenceResponse terminateSequenceResponse = (TerminateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
    Iterator sequenceAcknowledgementsIter = rmMsgCtx.getMessageParts(
        Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
    Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.SEQUENCE);
    Iterator ackRequestedIter = rmMsgCtx.getMessageParts(
        Sandesha2Constants.MessageParts.ACK_REQUEST);
    CloseSequence closeSequence = (CloseSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE);
    CloseSequenceResponse closeSequenceResponse = (CloseSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE_RESPONSE);
    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.MAKE_CONNECTION);

    // Setting message type.
    if (createSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ);
    } else if (createSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ_RESPONSE);
      sequenceID = createSequenceResponse.getIdentifier().getIdentifier();
    } else if (terminateSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ);
      sequenceID = terminateSequence.getIdentifier().getIdentifier();
    } else if (terminateSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ_RESPONSE);
      sequenceID = terminateSequenceResponse.getIdentifier().getIdentifier();
    } else if (rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE) != null) {
     
View Full Code Here

        Sandesha2Constants.MessageParts.CREATE_SEQ);
    CreateSequenceResponse createSequenceResponse = (CreateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
    TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    TerminateSequenceResponse terminateSequenceResponse = (TerminateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
    Iterator sequenceAcknowledgementsIter = rmMsgCtx.getMessageParts(
        Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
    Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.SEQUENCE);
    Iterator ackRequestedIter = rmMsgCtx.getMessageParts(
        Sandesha2Constants.MessageParts.ACK_REQUEST);
    CloseSequence closeSequence = (CloseSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE);
    CloseSequenceResponse closeSequenceResponse = (CloseSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE_RESPONSE);
    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.MAKE_CONNECTION);

    // Setting message type.
    if (createSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ);
    } else if (createSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ_RESPONSE);
      sequenceID = createSequenceResponse.getIdentifier().getIdentifier();
    } else if (terminateSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ);
      sequenceID = terminateSequence.getIdentifier().getIdentifier();
    } else if (terminateSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ_RESPONSE);
      sequenceID = terminateSequenceResponse.getIdentifier().getIdentifier();
    } else if (rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE) != null) {
     
      Sequence seq = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
      LastMessage lastMessage = seq.getLastMessage();
      SOAPEnvelope envelope = rmMsgCtx.getSOAPEnvelope();
View Full Code Here

      createSeqRMMsg.setProperty(Sandesha2Constants.MessageContextProperties.SECURITY_TOKEN, token);
     
      // If we are using token based security, and the 1.1 spec level, then we
      // should introduce a UsesSequenceSTR header into the message.
      if(createSequencePart.getNamespaceValue().equals(Sandesha2Constants.SPEC_2007_02.NS_URI)) {
        UsesSequenceSTR header = new UsesSequenceSTR(null, Sandesha2Constants.SPEC_2007_02.NS_URI);
        header.toSOAPEnvelope(createSeqmsgContext.getEnvelope());
      }

      // Ensure that the correct token will be used to secure the outbound create sequence message.
      // We cannot use the normal helper method as we have not stored the token into the sequence bean yet.
      secMgr.applySecurityToken(token, createSeqRMMsg.getMessageContext());
View Full Code Here

      createSeqRMMsg.setProperty(Sandesha2Constants.MessageContextProperties.SECURITY_TOKEN, token);
     
      // If we are using token based security, and the 1.1 spec level, then we
      // should introduce a UsesSequenceSTR header into the message.
      if(createSequencePart.getNamespaceValue().equals(Sandesha2Constants.SPEC_2007_02.NS_URI)) {
        UsesSequenceSTR header = new UsesSequenceSTR(null, Sandesha2Constants.SPEC_2007_02.NS_URI);
        header.toSOAPEnvelope(createSeqmsgContext.getEnvelope());
      }

      // Ensure that the correct token will be used to secure the outbound create sequence message.
      // We cannot use the normal helper method as we have not stored the token into the sequence bean yet.
      secMgr.applySecurityToken(token, createSeqRMMsg.getMessageContext());
View Full Code Here

      createSeqRMMsg.setProperty(Sandesha2Constants.MessageContextProperties.SECURITY_TOKEN, token);
     
      // If we are using token based security, and the 1.1 spec level, then we
      // should introduce a UsesSequenceSTR header into the message.
      if(createSequencePart.getNamespaceValue().equals(Sandesha2Constants.SPEC_2007_02.NS_URI)) {
        UsesSequenceSTR usesSeqStr = new UsesSequenceSTR();
        usesSeqStr.toHeader(createSeqmsgContext.getEnvelope().getHeader());
      }

      // Ensure that the correct token will be used to secure the outbound create sequence message.
      // We cannot use the normal helper method as we have not stored the token into the sequence bean yet.
      secMgr.applySecurityToken(token, createSeqRMMsg.getMessageContext());
View Full Code Here

      if(isSPEC2005_02 || isSPEC2007_02){
        boolean isProcessed = false;
        if(isSPEC2007_02){
          if(WSRM_COMMON.USES_SEQUENCE_STR.equals(localName)){
            usesSequenceSTR = new UsesSequenceSTR();
            usesSequenceSTR.fromHeaderBlock(element);
            isProcessed = true;
          }else if(WSRM_COMMON.MESSAGE_PENDING.equals(localName)){
            messagePending = new MessagePending();
            messagePending.fromHeaderBlock(element);
View Full Code Here

      if(isSPEC2005_02 || isSPEC2007_02){
        boolean isProcessed = false;
        if(isSPEC2007_02){
          if(WSRM_COMMON.USES_SEQUENCE_STR.equals(localName)){
            usesSequenceSTR = new UsesSequenceSTR();
            usesSequenceSTR.fromHeaderBlock(element);
            isProcessed = true;
          }else if(WSRM_COMMON.MESSAGE_PENDING.equals(localName)){
            messagePending = new MessagePending();
            messagePending.fromHeaderBlock(element);
View Full Code Here

      rmsBean.setSecurityTokenData(secManager.getTokenRecoveryData(token));
     
      // If we are using token based security, and the 1.1 spec level, then we
      // should introduce a UsesSequenceSTR header into the message.
      if(createSequencePart.getNamespaceValue().equals(Sandesha2Constants.SPEC_2006_08.NS_URI)) {
        UsesSequenceSTR header = new UsesSequenceSTR(null, Sandesha2Constants.SPEC_2006_08.NS_URI);
        header.toSOAPEnvelope(createSeqMsg.getEnvelope());
      }
    }
   
    rmsBeanMgr.insert(rmsBean);
View Full Code Here

   
    if (log.isDebugEnabled())
      log.debug("Enter: UseSequenceSTRProcessor::processSequenceHeader");
   
    //mustUnderstand processing
    UsesSequenceSTR usesSequenceSTR = (UsesSequenceSTR) rmMsgContext.getMessagePart(Sandesha2Constants.MessageParts.USES_SEQUENCE_STR);
   
    if (usesSequenceSTR!=null) {
      usesSequenceSTR.setMustUnderstand(false);
      usesSequenceSTR.toSOAPEnvelope (rmMsgContext.getSOAPEnvelope());
    }
   
    if (log.isDebugEnabled())
      log.debug("Exit: UseSequenceSTRProcessor::processSequenceHeader");
  }
View Full Code Here

TOP

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

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.