}
public boolean processMessage(RMMessageContext rmMessageContext) throws AxisFault {
RMHeaders rmHeaders = rmMessageContext.getRMHeaders();
AddressingHeaders addrHeaders = rmMessageContext.getAddressingHeaders();
AcknowledgementProcessor ackProcessor = new AcknowledgementProcessor(storageManager);
if (rmHeaders.getSequenceAcknowledgement() != null) {
ackProcessor.processMessage(rmMessageContext);
}
if (rmHeaders.getSequence() != null) {
if (rmHeaders.getSequence().getMessageNumber() != null) {
String sequenceUUID = rmHeaders.getSequence().getIdentifier().getIdentifier();
long messageNumber = rmHeaders.getSequence().getMessageNumber().getMessageNumber();
String seqId = storageManager.getOutgoingSeqenceIdOfIncomingMsg(rmMessageContext);
boolean hasSequence = storageManager.isSequenceExist(seqId);
if (addrHeaders.getRelatesTo() != null && !addrHeaders.getRelatesTo().isEmpty()) {
RelatesTo relatesTo = (RelatesTo) addrHeaders.getRelatesTo().get(0);
String messageId = relatesTo.getURI().toString();
seqId = storageManager.getOutgoingSeqOfMsg(messageId);
}
if (!hasSequence) {
storageManager.addIncomingSequence(seqId);