*/
public static void closeSequence(ServiceClient serviceClient) throws SandeshaException {
setUpServiceClientAnonymousOperations (serviceClient);
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
throw new SandeshaException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.serviceContextNotSet));
Options options = serviceClient.getOptions();
if (options == null)
throw new SandeshaException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.optionsObjectNotSet));
String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
if (rmSpecVersion == null)
rmSpecVersion = SpecSpecificConstants.getDefaultSpecVersion();
String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);
SOAPEnvelope closeSequnceEnvelope = configureCloseSequence(options, serviceContext.getConfigurationContext());
OMElement closeSequenceBody = closeSequnceEnvelope.getBody().getFirstChildWithName(
new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.CLOSE_SEQUENCE));
String oldAction = options.getAction();
options.setAction(SpecSpecificConstants.getCloseSequenceAction(rmSpecVersion));