Package nl.clockwork.mule.ebms.model.cpp.cpa

Examples of nl.clockwork.mule.ebms.model.cpp.cpa.DeliveryChannel


      d.addTo(timestamp);
      timestamp.add(Calendar.SECOND,1);
      messageHeader.getMessageData().setTimeToLive(DatatypeFactory.newInstance().newXMLGregorianCalendar(timestamp));
    }

    DeliveryChannel channel = CPAUtils.getDeliveryChannel(sendingPartyInfo.getCollaborationRole().get(0).getServiceBinding().getCanSend().get(0).getThisPartyActionBinding());

    messageHeader.setDuplicateElimination(PerMessageCharacteristicsType.ALWAYS.equals(channel.getMessagingCharacteristics().getDuplicateElimination()) ? "" : null);
   
    return messageHeader;
  }
View Full Code Here


  }

  public static AckRequested createAckRequested(CollaborationProtocolAgreement cpa, EbMSMessageContext context)
  {
    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

        if (deliveryChannels.size() > 1)
        {
          message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError(Constants.EbMSErrorCode.UNKNOWN.errorCode(),Constants.EbMSErrorCode.NOT_SUPPORTED.errorCode(),"Multiple DeliveryChannels not supported."));
          return false;
        }
        DeliveryChannel deliveryChannel = deliveryChannels.get(0);
        if (!checkTimeToLive(messageHeader))
        {
          message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/MessageHeader/MessageData/TimeToLive",Constants.EbMSErrorCode.TIME_TO_LIVE_EXPIRED.errorCode(),null));
          return false;
        }
View Full Code Here

TOP

Related Classes of nl.clockwork.mule.ebms.model.cpp.cpa.DeliveryChannel

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.