}
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;
}