Major revamp of credential and trust handling code, PKIX engine still needs work.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / SAML2SOAPClient.h
index 23b65a8..eae1030 100644 (file)
@@ -26,6 +26,7 @@
 #include <saml/binding/SOAPClient.h>
 
 namespace opensaml {
+
     namespace saml2p {
         
         class SAML_API RequestAbstractType;
@@ -35,30 +36,32 @@ namespace opensaml {
         /**
          * Specialized SOAPClient for SAML 2.0 SOAP binding.
          */
-        class SAML_API SAML2SOAPClient : opensaml::SOAPClient
+        class SAML_API SAML2SOAPClient
         {
         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
              */
-            SAML2SOAPClient(SecurityPolicy& policy, bool validating=false) : opensaml::SOAPClient(policy, validating) {}
+            SAML2SOAPClient(SOAPClient& soaper) : m_soaper(soaper), m_correlate(NULL) {
+            }
             
-            virtual ~SAML2SOAPClient() {}
+            virtual ~SAML2SOAPClient() {
+                XMLString::release(&m_correlate);
+            }
     
             /**
              * Specialized method for sending SAML 2.0 requests. The SOAP layer will be
              * constructed automatically.
              * 
-             * <p>The request will be freed by the client object if the method succeeds.
+             * <p>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 peer      peer to send message to, expressed in metadata criteria terms
              * @param endpoint  URL of endpoint to recieve message
              */
-            virtual void sendSAML(RequestAbstractType* request, const saml2md::RoleDescriptor& peer, const char* endpoint);
+            virtual void sendSAML(RequestAbstractType* request, saml2md::MetadataCredentialCriteria& peer, const char* endpoint);
             
             /**
              * Specialized method for receiving SAML 2.0 responses. The SOAP layer will be
@@ -78,6 +81,12 @@ 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;
+
+        private:
+            XMLCh* m_correlate;
         };
         
     };