From d00cec546ceda3a1897c82f2c7cb7c4d2e1c2fb7 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 24 Nov 2006 23:24:16 +0000 Subject: [PATCH] Add default HTTP headers to SOAP binding. --- saml/binding/impl/SOAPClient.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/saml/binding/impl/SOAPClient.cpp b/saml/binding/impl/SOAPClient.cpp index 45693dc..e97d326 100644 --- a/saml/binding/impl/SOAPClient.cpp +++ b/saml/binding/impl/SOAPClient.cpp @@ -22,12 +22,14 @@ #include "internal.h" #include "exceptions.h" +#include "version.h" #include "binding/SOAPClient.h" #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" #include #include +#include using namespace opensaml::saml2; using namespace opensaml::saml2md; @@ -48,6 +50,15 @@ void SOAPClient::send(const soap11::Envelope* env, const KeyInfoSource& peer, co void SOAPClient::prepareTransport(const xmltooling::SOAPTransport& transport) { + const HTTPSOAPTransport* http = dynamic_cast(&transport); + if (http) { + http->setRequestHeader("SOAPAction", "http://www.oasis-open.org/committees/security"); + http->setRequestHeader("Shibboleth", PACKAGE_VERSION); + http->setRequestHeader("Xerces-C", XERCES_FULLVERSIONDOT); + http->setRequestHeader("XML-Security-C", XSEC_VERSION); + http->setRequestHeader("OpenSAML-C", OPENSAML_FULLVERSIONDOT); + } + const X509TrustEngine* engine = dynamic_cast(m_policy.getTrustEngine()); if (engine) { const MetadataProvider* metadata = m_policy.getMetadataProvider(); -- 2.1.4