2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file saml/saml1/binding/SAML1SOAPClient.h
20 * Specialized SOAPClient for SAML 1.x SOAP binding.
23 #ifndef __saml1_soap11client_h__
24 #define __saml1_soap11client_h__
26 #include <saml/binding/SOAPClient.h>
31 class SAML_API Request;
32 class SAML_API Response;
33 class SAML_API Status;
36 * Specialized SOAPClient for SAML 1.x SOAP binding.
38 class SAML_API SAML1SOAPClient : opensaml::SOAPClient
42 * Creates a SOAP client instance with a particular SecurityPolicy.
44 * @param policy reference to SecurityPolicy to apply
46 SAML1SOAPClient(SecurityPolicy& policy) : opensaml::SOAPClient(policy), m_correlate(NULL) {}
48 virtual ~SAML1SOAPClient() {
49 XMLString::release(&m_correlate);
53 * Specialized method for sending SAML 1.x requests. The SOAP layer will be
54 * constructed automatically.
56 * <p>The request will be freed by the client object if the method succeeds.
58 * @param request SAML request to send
59 * @param peer peer to send message to, expressed in metadata terms
60 * @param endpoint URL of endpoint to recieve message
62 virtual void sendSAML(Request* request, const saml2md::RoleDescriptor& peer, const char* endpoint);
65 * Specialized method for receiving SAML 1.x responses. The SOAP layer will be
66 * evaluated automatically, and the attached policy will be applied to the Response.
68 * <p>The caller is responsible for freeing the Response.
70 * @return SAML 1.x Response, after SecurityPolicy has been applied
72 virtual Response* receiveSAML();
76 * Handling of SAML errors.
78 * @param status SAML Status received by client
79 * @return true iff the error should be treated as a fatal error
81 virtual bool handleError(const Status& status);
90 #endif /* __saml1_soap11client_h__ */