String propertyKey = SandeshaUtil.getSequencePropertyKey(rmMsgCtx);
// Check that both the Sequence header and message body have been secured properly
SequencePropertyBean tokenBean = seqPropMgr.retrieve(propertyKey, Sandesha2Constants.SequenceProperties.SECURITY_TOKEN);
if(tokenBean != null) {
SecurityManager secManager = SandeshaUtil.getSecurityManager(msgCtx.getConfigurationContext());
QName seqName = new QName(rmMsgCtx.getRMNamespaceValue(), Sandesha2Constants.WSRM_COMMON.SEQUENCE);
SOAPEnvelope envelope = msgCtx.getEnvelope();
OMElement body = envelope.getBody();
OMElement seqHeader = envelope.getHeader().getFirstChildWithName(seqName);
SecurityToken token = secManager.recoverSecurityToken(tokenBean.getValue());
secManager.checkProofOfPossession(token, seqHeader, msgCtx);
secManager.checkProofOfPossession(token, body, msgCtx);
}
//RM will not send sync responses. If sync acks are there this will be
// made true again later.
if (rmMsgCtx.getMessageContext().getOperationContext() != null) {