Examples of AckRequested


Examples of nl.clockwork.mule.ebms.model.ebxml.AckRequested

    PartyInfo partyInfo = CPAUtils.getSendingPartyInfo(cpa,context.getFromRole(),context.getServiceType(),context.getService(),context.getAction());
    DeliveryChannel channel = CPAUtils.getDeliveryChannel(partyInfo.getCollaborationRole().get(0).getServiceBinding().getCanSend().get(0).getThisPartyActionBinding());

    if (PerMessageCharacteristicsType.ALWAYS.equals(channel.getMessagingCharacteristics().getAckRequested()))
    {
      AckRequested ackRequested = new AckRequested();
      ackRequested.setVersion(Constants.EBMS_VERSION);
      ackRequested.setMustUnderstand(true);
      ackRequested.setSigned(PerMessageCharacteristicsType.ALWAYS.equals(channel.getMessagingCharacteristics().getAckSignatureRequested()));
      ackRequested.setActor(channel.getMessagingCharacteristics().getActor().value());
      return ackRequested;
    }
    else
      return null;
  }
View Full Code Here

Examples of nl.clockwork.mule.ebms.model.ebxml.AckRequested

  public static EbMSMessage ebMSMessageContentToEbMSMessage(CollaborationProtocolAgreement cpa, EbMSMessageContent content, String hostname) throws DatatypeConfigurationException
  {
    MessageHeader messageHeader = createMessageHeader(cpa,content.getContext(),hostname);

    AckRequested ackRequested = createAckRequested(cpa,content.getContext());
   
    Manifest manifest = createManifest();
    for (int i = 0; i < content.getAttachments().size(); i++)
      manifest.getReference().add(createReference(i + 1));
   
View Full Code Here

Examples of nl.clockwork.mule.ebms.model.ebxml.AckRequested

          if (!checkDuplicateElimination(deliveryChannel,messageHeader))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/MessageHeader/DuplicateElimination",Constants.EbMSErrorCode.INCONSISTENT.errorCode(),"Wrong value."));
            return false;
          }
          AckRequested ackRequested = ((EbMSMessage)message.getPayload()).getAckRequested();
          if (!checkAckRequested(deliveryChannel))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/AckRequested",Constants.EbMSErrorCode.NOT_SUPPORTED.errorCode(),"AckRequested mode not supported."));
            return false;
          }
          if (!checkAckRequested(deliveryChannel,ackRequested))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/AckRequested",Constants.EbMSErrorCode.INCONSISTENT.errorCode(),"Wrong value."));
            return false;
          }
          if (ackRequested != null && !Constants.EBMS_VERSION.equals(ackRequested.getVersion()))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/AckRequested[@version]",Constants.EbMSErrorCode.INCONSISTENT.errorCode(),"Wrong value."));
            return false;
          }
          if (ackRequested != null && ackRequested.getActor() != null && ackRequested.getActor().equals(ActorType.URN_OASIS_NAMES_TC_EBXML_MSG_ACTOR_NEXT_MSH.value()))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/AckRequested[@actor]",Constants.EbMSErrorCode.NOT_SUPPORTED.errorCode(),"NextMSH not supported."));
            return false;
          }
          if (!checkAckSignatureRequested(deliveryChannel))
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

    }

    //In case of ack request messages RM Namespace is decided based on the sequenceId of the last
    //ack request.
    for (Iterator iter = elements.getAckRequests();iter.hasNext();) {
      AckRequested ackRequest = (AckRequested) iter.next();
      rmMsgContext.setMessagePart(Sandesha2Constants.MessageParts.ACK_REQUEST, ackRequest);
      rmNamespace = ackRequest.getNamespaceValue();
    }

    if (elements.getCloseSequence() != null) {
      rmMsgContext.setMessagePart(Sandesha2Constants.MessageParts.CLOSE_SEQUENCE, elements.getCloseSequence());
      rmNamespace = elements.getCloseSequence().getNamespaceValue();
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

      //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.
      if (!ackRequestedIter.hasNext())
        sequenceID = ackRequest.getIdentifier().getIdentifier();
    } else if (closeSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE);
      sequenceID = closeSequence.getIdentifier().getIdentifier();
    } else if (closeSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE_RESPONSE);
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

        QName headerName = new QName(Sandesha2Constants.SPEC_NS_URIS[i], Sandesha2Constants.WSRM_COMMON.ACK_REQUESTED);
       
        Iterator acks = header.getChildrenWithName(headerName);
        while(acks.hasNext()) {
          OMElement ack = (OMElement) acks.next();
          AckRequested ackReq = new AckRequested(headerName.getNamespaceURI());
          ackReq.fromOMElement(ack);
          boolean paused = processAckRequestedHeader(message, ack, ackReq);
          //if nto already paused we might be now
          if(!msgCtxPaused){
            msgCtxPaused = paused;
          }
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

    getConfigurationContext().registerOperationContext(ackRequestRMMsg.getMessageId(), opcontext);
    getMsgContext().setOperationContext(opcontext);
   
    Iterator iterator = ackRequestRMMsg.getMessageParts(Sandesha2Constants.MessageParts.ACK_REQUEST);
   
    AckRequested ackRequested = null;
    while (iterator.hasNext()) {
      ackRequested = (AckRequested) iterator.next();
    }
   
    if (iterator.hasNext()) {
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

   
    // Generate the Close field.
    // -------------------------------
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(Sandesha2Constants.SPEC_VERSIONS.v1_1);

    AckRequested sequence = new AckRequested(rmNamespaceValue);
    Identifier id1 = new Identifier(rmNamespaceValue);
    id1.setIndentifer(uuid);
    sequence.setIdentifier(id1);
    applicationRMMsg.setMessagePart(Sandesha2Constants.MessageParts.CLOSE_SEQUENCE, sequence);
    applicationRMMsg.addSOAPEnvelope();

    // --------------------------------------------
    // Finished generating Close part
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

    } else if(messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {
      // The only time that we can have a message of this type is when we are sending a
      // stand-alone ack request, and in that case we only expect to find a single ack
      // request header in the message.
      Iterator ackRequests = rmMsgContext.getMessageParts(Sandesha2Constants.MessageParts.ACK_REQUEST);
      AckRequested ackRequest = (AckRequested) ackRequests.next();
      if (ackRequests.hasNext()) {
        throw new SandeshaException (SandeshaMessageHelper.getMessage(SandeshaMessageKeys.ackRequestMultipleParts));
      }
      id = ackRequest.getIdentifier();
    }
   
    // TODO consider adding an extra ack request, as we are about to send the message and we
    // know which sequence it is associated with.
View Full Code Here

Examples of org.apache.sandesha2.wsrm.AckRequested

      dummyEnvelope = factory.getDefaultEnvelope();
    }

    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);

    AckRequested ackRequested = new AckRequested(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(sequenceID);
    ackRequested.setIdentifier(identifier);

    ackRequested.toSOAPEnvelope(dummyEnvelope);

    return dummyEnvelope;
  }
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.