Log outbound XML in msg encoders.
[shibboleth/opensaml2.git] / saml / saml2 / binding / impl / SAML2ECPEncoder.cpp
index 99c4ddd..7a1f1ad 100644 (file)
@@ -221,9 +221,12 @@ long SAML2ECPEncoder::encode(
             rootElement = env->marshall();
         }
 
-        string xmlbuf;
-        XMLHelper::serialize(rootElement, xmlbuf);
-        istringstream s(xmlbuf);
+        stringstream s;
+        s << *rootElement;
+        
+        if (log.isDebugEnabled())
+            log.debug("marshalled envelope: %s", s.str().c_str());
+
         log.debug("sending serialized envelope");
         long ret = genericResponse.sendResponse(s);