class SAML_API MessageRoutingRule : public SecurityPolicyRule
{
public:
+ /**
+ * Constructor.
+ *
+ * If an XML attribute named mandatory is set to "true" or "1", then
+ * a destination address <strong>MUST</strong> be present in the message.
+ *
+ * @param e DOM tree to initialize rule
+ */
MessageRoutingRule(const DOMElement* e);
virtual ~MessageRoutingRule() {}
static const XMLCh mandatory[] = UNICODE_LITERAL_9(m,a,n,d,a,t,o,r,y);
-MessageRoutingRule::MessageRoutingRule(const DOMElement* e) : m_mandatory(true)
+MessageRoutingRule::MessageRoutingRule(const DOMElement* e) : m_mandatory(false)
{
if (e) {
const XMLCh* attr = e->getAttributeNS(NULL, mandatory);
- if (attr && (*attr==chLatin_f || *attr==chDigit_0))
- m_mandatory = false;
+ if (attr && (*attr==chLatin_t || *attr==chDigit_1))
+ m_mandatory = true;
}
}