Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.TerminateSequence


    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


    RMMsgContext terminateRMMessage = MsgInitializer.initializeMessage(terminateMessage);

    if (terminateMessage == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.msgContextNotSet));

    TerminateSequence terminateSequencePart = new TerminateSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(rmsBean.getSequenceID());
    terminateSequencePart.setIdentifier(identifier);
    terminateRMMessage.setMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ, terminateSequencePart);

    // no need for an incoming transport for a terminate
    // message. If this is put, sender will look for an response.
    terminateMessage.setProperty(MessageContext.TRANSPORT_IN, null);
View Full Code Here

        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE,action);
  }

  public static RMMsgContext createTerminateSeqResponseMsg(RMMsgContext terminateSeqRMMsg, RMSequenceBean rmSequenceBean) throws AxisFault {
       
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg
        .getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    String sequenceID = terminateSequence.getIdentifier().getIdentifier();

    String namespace = terminateSeqRMMsg.getRMNamespaceValue();

    TerminateSequenceResponse terminateSequenceResponse = new TerminateSequenceResponse(namespace);
    Identifier identifier = new Identifier(namespace);
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

    }

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

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

    finalizeCreation(referenceMessage, terminateMessage);

    terminateMessage.setProperty(MessageContext.TRANSPORT_IN, null); // no
View Full Code Here

    RMMsgContext terminateSeqResponseRMMsg = new RMMsgContext(outMessage);

    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(namespace);
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) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.APPLICATION);
View Full Code Here

      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);
    terminateSequence.toSOAPEnvelope(dummyEnvelope);

    return dummyEnvelope;
  }
View Full Code Here

    RMMsgContext terminateRMMessage = MsgInitializer.initializeMessage(terminateMessage);

    if (terminateMessage == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.msgContextNotSet));

    TerminateSequence terminateSequencePart = new TerminateSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(rmsBean.getSequenceID());
    terminateSequencePart.setIdentifier(identifier);
    terminateRMMessage.setMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ, terminateSequencePart);

    // no need for an incoming transport for a terminate
    // message. If this is put, sender will look for an response.
    terminateMessage.setProperty(MessageContext.TRANSPORT_IN, null);
View Full Code Here

        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE,action);
  }

  public static RMMsgContext createTerminateSeqResponseMsg(RMMsgContext terminateSeqRMMsg, RMSequenceBean rmSequenceBean) throws AxisFault {
       
    TerminateSequence terminateSequence = (TerminateSequence) terminateSeqRMMsg
        .getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    String sequenceID = terminateSequence.getIdentifier().getIdentifier();

    String namespace = terminateSeqRMMsg.getRMNamespaceValue();

    TerminateSequenceResponse terminateSequenceResponse = new TerminateSequenceResponse(namespace);
    Identifier identifier = new Identifier(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.