Support path resolution in binding templates.
[shibboleth/opensaml2.git] / saml / saml1 / binding / impl / SAML1POSTEncoder.cpp
index df0ee43..2b0107b 100644 (file)
@@ -31,6 +31,7 @@
 #include <xercesc/util/Base64.hpp>
 #include <xmltooling/logging.h>
 #include <xmltooling/util/NDC.h>
+#include <xmltooling/util/PathResolver.h>
 #include <xmltooling/util/TemplateEngine.h>
 
 using namespace opensaml::saml1p;
@@ -84,6 +85,7 @@ SAML1POSTEncoder::SAML1POSTEncoder(const DOMElement* e, const XMLCh* ns)
     }
     if (m_template.empty())
         throw XMLToolingException("SAML1POSTEncoder requires template XML attribute.");
+    XMLToolingConfig::getConfig().getPathResolver()->resolve(m_template, PathResolver::XMLTOOLING_CFG_FILE);
 }
 
 long SAML1POSTEncoder::encode(
@@ -150,7 +152,7 @@ long SAML1POSTEncoder::encode(
     TemplateEngine::TemplateParameters pmap;
     string& xmlbuf = pmap.m_map["SAMLResponse"];
     XMLHelper::serialize(rootElement, xmlbuf);
-    log.debug("marshalled response: %s", xmlbuf.c_str());
+    log.debug("marshalled response:\n%s", xmlbuf.c_str());
     
     // Replace with base-64 encoded version.
     unsigned int len=0;