X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml1%2Fbinding%2FSAML1SOAPClient.h;h=0b8a3f125fa8bb4a65afd454b6f6f8a903948729;hb=c072b75e6f6e05e24a1c35b952008b38d0d375c1;hp=783c7c22f67a6fd7fe0f12f5d7941a0c903d2e72;hpb=730ef8006d0bdf6a6d111e416b8828c02f58fc32;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml1/binding/SAML1SOAPClient.h b/saml/saml1/binding/SAML1SOAPClient.h index 783c7c2..0b8a3f1 100644 --- a/saml/saml1/binding/SAML1SOAPClient.h +++ b/saml/saml1/binding/SAML1SOAPClient.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,15 +17,22 @@ /** * @file saml/saml1/binding/SAML1SOAPClient.h * - * Specialized SOAPClient for SAML 1.x SOAP binding. + * Client class for SAML 1.x SOAP binding. */ #ifndef __saml1_soap11client_h__ #define __saml1_soap11client_h__ -#include +#include namespace opensaml { + + class SAML_API SOAPClient; + + namespace saml2md { + class SAML_API MetadataCredentialCriteria; + }; + namespace saml1p { class SAML_API Request; @@ -33,32 +40,36 @@ namespace opensaml { class SAML_API Status; /** - * Specialized SOAPClient for SAML 1.x SOAP binding. + * Client class for SAML 1.x SOAP binding. */ - class SAML_API SAML1SOAPClient : public opensaml::SOAPClient + class SAML_API SAML1SOAPClient { public: /** - * Creates a SOAP client instance with a particular SecurityPolicy. + * Constructor * - * @param policy reference to SecurityPolicy to apply - * @param validating controls schema validation + * @param soaper reference to SOAPClient object to use for call + * @param fatalSAMLErrors true iff a non-successful SAML Status code should be fatal */ - SAML1SOAPClient(SecurityPolicy& policy, bool validating=false) : opensaml::SOAPClient(policy, validating) {} + SAML1SOAPClient(SOAPClient& soaper, bool fatalSAMLErrors=true) : m_soaper(soaper), m_fatal(fatalSAMLErrors), m_correlate(NULL) { + } - virtual ~SAML1SOAPClient() {} + virtual ~SAML1SOAPClient() { + xercesc::XMLString::release(&m_correlate); + } /** * Specialized method for sending SAML 1.x requests. The SOAP layer will be * constructed automatically. * - *

The request will be freed by the client object if the method succeeds. + *

The request will be freed by the client object regardless of the outcome. * * @param request SAML request to send - * @param peer peer to send message to, expressed in metadata terms + * @param from identity of sending application + * @param to peer to send message to, expressed in metadata criteria terms * @param endpoint URL of endpoint to recieve message */ - virtual void sendSAML(Request* request, const saml2md::RoleDescriptor& peer, const char* endpoint); + virtual void sendSAML(Request* request, const char* from, saml2md::MetadataCredentialCriteria& to, const char* endpoint); /** * Specialized method for receiving SAML 1.x responses. The SOAP layer will be @@ -78,6 +89,15 @@ namespace opensaml { * @return true iff the error should be treated as a fatal error */ virtual bool handleError(const Status& status); + + /** SOAP client object. */ + SOAPClient& m_soaper; + + /** Flag controlling default error handler. */ + bool m_fatal; + + private: + XMLCh* m_correlate; }; };