SequenceAcknowledgementDocument resultDoc = SequenceAcknowledgementDocument.Factory.newInstance();
SequenceAcknowledgement acknowledgement = resultDoc.addNewSequenceAcknowledgement();
acknowledgement.setIdentifier(sequence.getIdentifier());
if( s.lastMessageAcked> 0 ) {
AcknowledgementRange range = acknowledgement.addNewAcknowledgementRange();
range.setLower(BigInteger.ONE);
range.setUpper(new BigInteger(""+s.lastMessageAcked));
}
acknowledgement.addNack(value);
return resultDoc;
}