2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
22 * @file shibsp/binding/SOAPClient.h
24 * Specialized SOAPClient for SP environment.
27 #ifndef __shibsp_soap11client_h__
28 #define __shibsp_soap11client_h__
30 #include <shibsp/base.h>
32 #include <saml/binding/SOAPClient.h>
36 class SHIBSP_API PropertySet;
37 class SHIBSP_API SecurityPolicy;
40 * Specialized SOAPClient for SP environment.
42 class SHIBSP_API SOAPClient : public opensaml::SOAPClient
46 * Creates a SOAP client instance for an Application to use.
48 * @param policy reference to SP-SecurityPolicy to apply
50 SOAPClient(SecurityPolicy& policy);
52 virtual ~SOAPClient();
55 * Override handles message signing for SAML payloads.
57 * @param env SOAP envelope to send
58 * @param from identity of sending application
59 * @param to peer to send message to, expressed in metadata terms
60 * @param endpoint URL of endpoint to recieve message
62 void send(const soap11::Envelope& env, const char* from, opensaml::saml2md::MetadataCredentialCriteria& to, const char* endpoint);
68 * Override prepares transport by applying policy settings from Application.
70 * @param transport reference to transport layer
72 void prepareTransport(xmltooling::SOAPTransport& transport);
74 /** Application supplied to client. */
75 const Application& m_app;
77 /** RelyingParty properties, set after transport prep. */
78 const PropertySet* m_relyingParty;
80 /** Locked CredentialResolver for transport, set after transport prep. */
81 xmltooling::CredentialResolver* m_credResolver;
86 #endif /* __shibsp_soap11client_h__ */