factory = new SOAP11Factory();
dummyEnvelope = factory.getDefaultEnvelope();
}
String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);
TerminateSequence terminateSequence = new TerminateSequence(rmNamespaceValue);
Identifier identifier = new Identifier(rmNamespaceValue);
identifier.setIndentifer(sequenceID);
terminateSequence.setIdentifier(identifier);
if(TerminateSequence.isLastMsgNumberRequired(rmNamespaceValue)){
try
{
transaction = storageManager.getTransaction();
LastMessageNumber lastMessageNumber = new LastMessageNumber(rmNamespaceValue);
lastMessageNumber.setMessageNumber(SandeshaUtil.getLastMessageNumber(internalSequenceID, storageManager));
terminateSequence.setLastMessageNumber(lastMessageNumber);
}
finally
{
// Commit the tran whatever happened
if(transaction != null) transaction.commit();
}
}
terminateSequence.toSOAPEnvelope(dummyEnvelope);
return dummyEnvelope;
}