X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2Fimpl%2FSAML2SOAPDecoder.cpp;h=8325d33c541b3458a9da6cfcc1f6b48c349e8e33;hb=5d7bff8c9b4a048d34dda50c40ed355cf4dd84de;hp=2d9d22f370e234f3190b0d27b10971991cda9053;hpb=98b9be4dacac1d9a8729906473e35fc904676d12;p=shibboleth%2Fopensaml2.git diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index 2d9d22f..8325d33 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -22,10 +22,10 @@ #include "internal.h" #include "exceptions.h" -#include "binding/MessageDecoder.h" +#include "saml2/binding/SAML2MessageDecoder.h" #include "saml2/core/Protocols.h" -#include +#include #include #include #include @@ -33,16 +33,16 @@ using namespace opensaml::saml2p; using namespace opensaml; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { namespace saml2p { - class SAML_DLLLOCAL SAML2SOAPDecoder : public MessageDecoder + class SAML_DLLLOCAL SAML2SOAPDecoder : public SAML2MessageDecoder { public: - SAML2SOAPDecoder(const DOMElement* e); + SAML2SOAPDecoder() {} virtual ~SAML2SOAPDecoder() {} bool isUserAgentPresent() const { @@ -56,15 +56,13 @@ namespace opensaml { ) const; }; - MessageDecoder* SAML_DLLLOCAL SAML2SOAPDecoderFactory(const DOMElement* const & e) + MessageDecoder* SAML_DLLLOCAL SAML2SOAPDecoderFactory(const pair& p) { - return new SAML2SOAPDecoder(e); + return new SAML2SOAPDecoder(); } }; }; -SAML2SOAPDecoder::SAML2SOAPDecoder(const DOMElement* e) {} - XMLObject* SAML2SOAPDecoder::decode( string& relayState, const GenericRequest& genericRequest, @@ -107,7 +105,10 @@ XMLObject* SAML2SOAPDecoder::decode( RequestAbstractType* request = dynamic_cast(body->getUnknownXMLObjects().front()); if (request) { // Run through the policy at two layers. + extractMessageDetails(*env, genericRequest, samlconstants::SAML20P_NS, policy); policy.evaluate(*env, &genericRequest); + policy.reset(true); + extractMessageDetails(*request, genericRequest, samlconstants::SAML20P_NS, policy); policy.evaluate(*request, &genericRequest); xmlObject.release(); body->detach(); // frees Envelope