First SOAP encoder.
[shibboleth/cpp-opensaml.git] / saml / saml1 / binding / impl / SAML1POSTEncoder.cpp
index ccc5510..5c15044 100644 (file)
@@ -61,10 +61,8 @@ SAML1POSTEncoder::SAML1POSTEncoder(const DOMElement* e)
         throw XMLToolingException("SAML1POSTEncoder requires template attribute.");
 }
 
-SAML1POSTEncoder::~SAML1POSTEncoder() {}
-
 long SAML1POSTEncoder::encode(
-    HTTPResponse& httpResponse,
+    GenericResponse& genericResponse,
     XMLObject* xmlObject,
     const char* destination,
     const char* recipientID,
@@ -77,8 +75,8 @@ long SAML1POSTEncoder::encode(
     xmltooling::NDC ndc("encode");
 #endif
     Category& log = Category::getInstance(SAML_LOGCAT".MessageEncoder.SAML1POST");
+
     log.debug("validating input");
-    
     if (xmlObject->getParent())
         throw BindingException("Cannot encode XML content with parent.");
     Response* response = dynamic_cast<Response*>(xmlObject);
@@ -137,7 +135,8 @@ long SAML1POSTEncoder::encode(
     params["TARGET"] = relayState;
     stringstream s;
     engine->run(infile, s, params);
-    long ret = httpResponse.sendResponse(s);
+    genericResponse.setContentType("text/html");
+    long ret = genericResponse.sendResponse(s);
 
     // Cleanup by destroying XML.
     delete xmlObject;