return resultDoc;
}
public SequenceAcknowledgementDocument acknowledgeRequested(AckRequestedDocument doc) {
AckRequestedType sequence = doc.getAckRequested();
String identifier = sequence.getIdentifier().getStringValue();
Sequence s = sequenceStore.retrieve(identifier);
if( s == null ) {
throw new SoapFault(
"The value of wsrm:Identifier is not a known Sequence identifier",
"Sender",
"wsrm:UnknownSequence",
sequence.getIdentifier().xmlText());
}
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));
}