X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2POSTEncoder.cpp;h=53f08cfabf3c5b727bb2da847ca26b39d90c733a;hb=5e62d2c1fb43763b3d627e641a310a79992b01c0;hp=d38d8b5ab6b90c881118e7aae4368b16c8c77ee2;hpb=e9554c255ad3c91c7c4976e7a1a54905903e66a2;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp index d38d8b5..53f08cf 100644 --- a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp @@ -55,7 +55,11 @@ namespace opensaml { public: SAML2POSTEncoder(const DOMElement* e, const XMLCh* ns, bool simple=false); virtual ~SAML2POSTEncoder() {} - + + const XMLCh* getProtocolFamily() const { + return samlconstants::SAML20P_NS; + } + long encode( GenericResponse& genericResponse, XMLObject* xmlObject, @@ -87,13 +91,9 @@ namespace opensaml { static const XMLCh _template[] = UNICODE_LITERAL_8(t,e,m,p,l,a,t,e); -SAML2POSTEncoder::SAML2POSTEncoder(const DOMElement* e, const XMLCh* ns, bool simple) : m_simple(simple) +SAML2POSTEncoder::SAML2POSTEncoder(const DOMElement* e, const XMLCh* ns, bool simple) + : m_template(XMLHelper::getAttrString(e, "bindingTemplate.html", _template, ns)), m_simple(simple) { - if (e) { - auto_ptr_char t(e->getAttributeNS(ns, _template)); - if (t.get() && *t.get()) - m_template = t.get(); - } if (m_template.empty()) throw XMLToolingException("SAML2POSTEncoder requires template XML attribute."); XMLToolingConfig::getConfig().getPathResolver()->resolve(m_template, PathResolver::XMLTOOLING_CFG_FILE);