Add XML validation flag to policy.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / impl / SAML2POSTDecoder.cpp
index 5f763f5..90d0b63 100644 (file)
@@ -92,7 +92,7 @@ XMLObject* SAML2POSTDecoder::decode(
     XMLString::release(&decoded);
     
     // Parse and bind the document into an XMLObject.
-    DOMDocument* doc = (m_validate ? XMLToolingConfig::getConfig().getValidatingParser()
+    DOMDocument* doc = (policy.getValidating() ? XMLToolingConfig::getConfig().getValidatingParser()
         : XMLToolingConfig::getConfig().getParser()).parse(is); 
     XercesJanitor<DOMDocument> janitor(doc);
     auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
@@ -111,7 +111,7 @@ XMLObject* SAML2POSTDecoder::decode(
         root = static_cast<saml2::RootObject*>(request);
     }
     
-    if (!m_validate)
+    if (!policy.getValidating())
         SchemaValidators.validate(xmlObject.get());
 
     // Run through the policy.