xmltooling::NDC ndc("encode");
#endif
Category& log = Category::getInstance(SAML_LOGCAT".MessageEncoder.SAML2Artifact");
-
log.debug("validating input");
+ if (!destination)
+ throw BindingException("Encoding response requires a destination.");
HTTPResponse* httpResponse=dynamic_cast<HTTPResponse*>(&genericResponse);
if (!httpResponse)
throw BindingException("Unable to cast response interface to HTTPResponse type.");
if (relayState && strlen(relayState)>80)
throw BindingException("RelayState cannot exceed 80 bytes in length.");
-
if (xmlObject->getParent())
throw BindingException("Cannot encode XML content with parent.");
TemplateEngine* engine = XMLToolingConfig::getConfig().getTemplateEngine();
if (!engine)
throw BindingException("Encoding artifact using POST requires a TemplateEngine instance.");
+ HTTPResponse::sanitizeURL(destination);
ifstream infile(m_template.c_str());
if (!infile)
throw BindingException("Failed to open HTML template for POST response ($1).", params(1,m_template.c_str()));