#include <xmltooling/soap/SOAPTransport.h>
Inheritance diagram for xmltooling::SOAPTransport:
Public Types | |
transport_auth_none = 0 | |
transport_auth_basic = 1 | |
transport_auth_digest = 2 | |
transport_auth_ntlm = 3 | |
transport_auth_gss = 4 | |
enum | transport_auth_t { transport_auth_none = 0, transport_auth_basic = 1, transport_auth_digest = 2, transport_auth_ntlm = 3, transport_auth_gss = 4 } |
Common types of transport authentication that may be supported. | |
Public Member Functions | |
virtual bool | isConfidential () const =0 |
Indicates whether transport provides confidentiality. | |
virtual bool | setConnectTimeout (long timeout)=0 |
Sets the connection timeout. | |
virtual bool | setTimeout (long timeout)=0 |
Sets the request timeout. | |
virtual bool | setAuth (transport_auth_t authType, const char *username=NULL, const char *password=NULL)=0 |
Sets a particular form of transport authentication and credentials. | |
virtual bool | setVerifyHost (bool verify)=0 |
Determines whether TLS/SSL connections include a check of the server's certificate against the expected hostname or address. | |
virtual bool | setCredential (const Credential *credential=NULL)=0 |
Supplies transport credentials. | |
virtual bool | setTrustEngine (const X509TrustEngine *trustEngine=NULL, const CredentialResolver *credResolver=NULL, CredentialCriteria *criteria=NULL, bool mandatory=true)=0 |
Provides an X509TrustEngine to the transport to authenticate the transport peer. | |
virtual bool | setProviderOption (const char *provider, const char *option, const char *value) |
Sets an implementation-specific transport provider option. | |
virtual void | send (std::istream &in)=0 |
Sends a stream of data over the transport. | |
virtual void | send (std::istream *in=NULL) |
Sends an optional stream of data over the transport. | |
virtual std::istream & | receive ()=0 |
Returns reference to response stream. | |
virtual bool | isAuthenticated () const =0 |
Returns result of authenticating transport peer. | |
virtual std::string | getContentType () const =0 |
Returns the MIME type of the response, if any. | |
Classes | |
struct | Address |
A simple structure to capture SOAP addressing information. More... |
Most of the methods are const, meaning they don't affect the transport layer until the data is sent.
virtual std::string xmltooling::SOAPTransport::getContentType | ( | ) | const [pure virtual] |
Returns the MIME type of the response, if any.
virtual bool xmltooling::SOAPTransport::isAuthenticated | ( | ) | const [pure virtual] |
Returns result of authenticating transport peer.
virtual bool xmltooling::SOAPTransport::isConfidential | ( | ) | const [pure virtual] |
Indicates whether transport provides confidentiality.
virtual std::istream& xmltooling::SOAPTransport::receive | ( | ) | [pure virtual] |
Returns reference to response stream.
The resulting stream must be checked directly to determine whether data is available.
virtual void xmltooling::SOAPTransport::send | ( | std::istream * | in = NULL |
) | [virtual] |
Sends an optional stream of data over the transport.
The function may return without having received any data, depending on the nature of the transport.
If the parameter is omitted, a request may be issued with no body if the transport supports that feature.
in | input stream to send |
virtual void xmltooling::SOAPTransport::send | ( | std::istream & | in | ) | [pure virtual] |
Sends a stream of data over the transport.
The function may return without having received any data, depending on the nature of the transport.
If the stream is empty, a request may be issued with no body if the transport supports that feature.
in | input stream to send |
virtual bool xmltooling::SOAPTransport::setAuth | ( | transport_auth_t | authType, | |
const char * | username = NULL , |
|||
const char * | password = NULL | |||
) | [pure virtual] |
Sets a particular form of transport authentication and credentials.
authType | type of transport authentication to use | |
username | username for transport authentication | |
password | simple password/credential for transport authentication |
virtual bool xmltooling::SOAPTransport::setConnectTimeout | ( | long | timeout | ) | [pure virtual] |
Sets the connection timeout.
timeout | time to wait for connection to server in seconds, or -1 for no timeout |
virtual bool xmltooling::SOAPTransport::setCredential | ( | const Credential * | credential = NULL |
) | [pure virtual] |
Supplies transport credentials.
The lifetime of the credential must be longer than the lifetime of this object.
credential | a Credential instance, or NULL |
virtual bool xmltooling::SOAPTransport::setProviderOption | ( | const char * | provider, | |
const char * | option, | |||
const char * | value | |||
) | [inline, virtual] |
Sets an implementation-specific transport provider option.
Requires knowledge of the underlying SOAPTransport implementation. Without the proper knowledge and inputs, crashes may result.
provider | name of the SOAPTransport class the caller believes is in use | |
option | implementation-specific string containing the option to set | |
value | implementation- and option-specific string to use |
virtual bool xmltooling::SOAPTransport::setTimeout | ( | long | timeout | ) | [pure virtual] |
Sets the request timeout.
timeout | time to wait for a response in seconds, or -1 for no timeout |
virtual bool xmltooling::SOAPTransport::setTrustEngine | ( | const X509TrustEngine * | trustEngine = NULL , |
|
const CredentialResolver * | credResolver = NULL , |
|||
CredentialCriteria * | criteria = NULL , |
|||
bool | mandatory = true | |||
) | [pure virtual] |
Provides an X509TrustEngine to the transport to authenticate the transport peer.
The lifetime of the engine must be longer than the lifetime of this object.
trustEngine | an X509TrustEngine instance, or NULL | |
credResolver | a CredentialResolver to supply the peer's trusted credentials, or NULL | |
criteria | optional criteria for selecting peer credentials | |
mandatory | flag controls whether message is sent at all if the transport isn't authenticated using the TrustEngine |
virtual bool xmltooling::SOAPTransport::setVerifyHost | ( | bool | verify | ) | [pure virtual] |
Determines whether TLS/SSL connections include a check of the server's certificate against the expected hostname or address.
Defaults to true, and has no effect for insecure protocols.
verify | true iff the hostname should be verified against the server's certificate |