options.setProperty(SandeshaClientConstants.DUMMY_MESSAGE, Sandesha2Constants.VALUE_TRUE);
String oldAction = options.getAction();
options.setAction(SpecSpecificConstants.getCreateSequenceAction(rmSpecVersion));
ServiceContext serviceContext = serviceClient.getServiceContext();
if (serviceContext == null)
throw new SandeshaException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.serviceContextNotSet));
ConfigurationContext configurationContext = serviceContext.getConfigurationContext();
// cleanup previous sequence
cleanupTerminatedSequence(to, oldSequenceKey, SandeshaUtil.getSandeshaStorageManager(configurationContext, configurationContext.getAxisConfiguration()));
// If the client requested async operations, mint a replyTo EPR
boolean resetReply = false;
if(options.isUseSeparateListener() && options.getReplyTo() == null) {
try {
if(log.isDebugEnabled()) log.debug("Creating replyTo EPR");
// Try to work out which transport to use. If the user didn't choose one
// then we use the To address to take a guess.
TransportOutDescription senderTransport = options.getTransportOut();
String transportName = null;
if(senderTransport != null) {
transportName = senderTransport.getName();
}
if(transportName == null) {
int index = to.indexOf(':');
if(index > 0) transportName = to.substring(0, index);
}
EndpointReference replyTo = serviceContext.getMyEPR(transportName);
if(replyTo != null) {
options.setReplyTo(replyTo);
resetReply = true;
}