#include "internal.h"
#include "exceptions.h"
-#include "saml2/binding/SAML2SOAPDecoder.h"
+#include "binding/MessageDecoder.h"
+#include "saml2/core/Protocols.h"
#include <log4cpp/Category.hh>
#include <xmltooling/soap/SOAP.h>
namespace opensaml {
namespace saml2p {
+ class SAML_DLLLOCAL SAML2SOAPDecoder : public MessageDecoder
+ {
+ public:
+ SAML2SOAPDecoder(const DOMElement* e);
+ virtual ~SAML2SOAPDecoder() {}
+
+ bool isUserAgentPresent() const {
+ return false;
+ }
+
+ xmltooling::XMLObject* decode(
+ std::string& relayState,
+ const GenericRequest& genericRequest,
+ SecurityPolicy& policy
+ ) const;
+ };
+
MessageDecoder* SAML_DLLLOCAL SAML2SOAPDecoderFactory(const DOMElement* const & e)
{
return new SAML2SOAPDecoder(e);
istringstream is(data);
// Parse and bind the document into an XMLObject.
- DOMDocument* doc = (m_validate ? XMLToolingConfig::getConfig().getValidatingParser()
+ DOMDocument* doc = (policy.getValidating() ? XMLToolingConfig::getConfig().getValidatingParser()
: XMLToolingConfig::getConfig().getParser()).parse(is);
XercesJanitor<DOMDocument> janitor(doc);
auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
if (!env)
throw BindingException("Decoded message was not a SOAP 1.1 Envelope.");
- if (!m_validate)
+ if (!policy.getValidating())
SchemaValidators.validate(env);
Body* body = env->getBody();