LOG.fine("isServerSide: " + isServer);
RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
// message addressing properties may be null, e.g. in case of a runtime fault
// on the server side
final AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false);
if (null == maps) {
//if wsrmp:RMAssertion and addressing is optional
if (isServer && !isRMPolicyEnabled(message)) {
org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(
"WSA_REQUIRED_EXC", LOG);
LOG.log(Level.INFO, msg.toString());
throw new RMException(msg);
} else {
return;
}
}
String action = null;
if (null != maps.getAction()) {
action = maps.getAction().getValue();
}
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Action: " + action);
}
// RM does not apply to WS-Trust messages, as used by WS-SecureConversation
if (action != null && action.contains("/RST/SCT")
&& (action.startsWith(STSUtils.WST_NS_05_02) || action.startsWith(STSUtils.WST_NS_05_12))) {
return;
}
Object originalRequestor = message.get(RMMessageConstants.ORIGINAL_REQUESTOR_ROLE);
if (null != originalRequestor) {
LOG.fine("Restoring original requestor role to: " + originalRequestor);
message.put(Message.REQUESTOR_ROLE, originalRequestor);
}
// get the wsa and wsrm namespaces from the message
String rmUri = rmps.getNamespaceURI();
String addrUri = maps.getNamespaceURI();
ProtocolVariation protocol = ProtocolVariation.findVariant(rmUri, addrUri);
if (null == protocol && !MessageUtils.isFault(message)) {
org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(
"WSRM_REQUIRED_EXC", LOG, rmUri, addrUri);