Encapsulates a transport layer protocol for sending/receiving messages.
More...
#include <xmltooling/soap/SOAPTransport.h>
|
struct | Address |
| A simple structure to capture SOAP addressing information. More...
|
|
|
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.
|
|
|
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=0, const char *password=0)=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=0)=0 |
| Supplies transport credentials.
|
|
virtual bool | setTrustEngine (const X509TrustEngine *trustEngine=0, const CredentialResolver *credResolver=0, CredentialCriteria *criteria=0, bool mandatory=true)=0 |
| Provides an X509TrustEngine to the transport to authenticate the transport peer.
|
|
virtual bool | setCacheTag (std::string *cacheTag=0) |
| Installs (or clears) a pointer to an object used for cache management of the content being accessed.
|
|
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=0) |
| 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.
|
|
virtual long | getStatusCode () const |
| Returns the status code of the response.
|
|
Encapsulates a transport layer protocol for sending/receiving messages.
Most of the methods are const, meaning they don't affect the transport layer until the data is sent.
◆ getContentType()
virtual std::string xmltooling::SOAPTransport::getContentType |
( |
| ) |
const |
|
pure virtual |
Returns the MIME type of the response, if any.
- Returns
- MIME type of response, or an empty string
◆ getStatusCode()
virtual long xmltooling::SOAPTransport::getStatusCode |
( |
| ) |
const |
|
virtual |
Returns the status code of the response.
- Returns
- transport status code, or 0 if unknown
◆ isAuthenticated()
virtual bool xmltooling::SOAPTransport::isAuthenticated |
( |
| ) |
const |
|
pure virtual |
Returns result of authenticating transport peer.
- Returns
- true iff TrustEngine or other mechanism successfully authenticated the peer
◆ isConfidential()
virtual bool xmltooling::SOAPTransport::isConfidential |
( |
| ) |
const |
|
pure virtual |
Indicates whether transport provides confidentiality.
- Returns
- true iff transport layer provides confidentiality
◆ receive()
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.
- Returns
- reference to a stream containing the response, if any
◆ send() [1/2]
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.
- Parameters
-
◆ send() [2/2]
virtual void xmltooling::SOAPTransport::send |
( |
std::istream * | in = 0 | ) |
|
|
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.
- Parameters
-
◆ setAuth()
virtual bool xmltooling::SOAPTransport::setAuth |
( |
transport_auth_t | authType, |
|
|
const char * | username = 0, |
|
|
const char * | password = 0 ) |
|
pure virtual |
Sets a particular form of transport authentication and credentials.
- Parameters
-
authType | type of transport authentication to use |
username | username for transport authentication |
password | simple password/credential for transport authentication |
- Returns
- true iff the transport supports the indicated form of authentication
◆ setCacheTag()
virtual bool xmltooling::SOAPTransport::setCacheTag |
( |
std::string * | cacheTag = 0 | ) |
|
|
virtual |
Installs (or clears) a pointer to an object used for cache management of the content being accessed.
The lifetime of the object must be longer than the lifetime of this object.
- Parameters
-
cacheTag | optional pointer to string used for cache management |
◆ setConnectTimeout()
virtual bool xmltooling::SOAPTransport::setConnectTimeout |
( |
long | timeout | ) |
|
|
pure virtual |
Sets the connection timeout.
- Parameters
-
timeout | time to wait for connection to server in seconds, or -1 for no timeout |
- Returns
- true iff the transport supports connection timeouts
◆ setCredential()
virtual bool xmltooling::SOAPTransport::setCredential |
( |
const Credential * | credential = 0 | ) |
|
|
pure virtual |
Supplies transport credentials.
The lifetime of the credential must be longer than the lifetime of this object.
- Parameters
-
- Returns
- true iff the transport supports the use of the Credential
◆ setProviderOption()
virtual bool xmltooling::SOAPTransport::setProviderOption |
( |
const char * | provider, |
|
|
const char * | option, |
|
|
const char * | value ) |
|
virtual |
Sets an implementation-specific transport provider option.
Requires knowledge of the underlying SOAPTransport implementation. Without the proper knowledge and inputs, crashes may result.
- Parameters
-
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 |
- Returns
- true iff the transport supports the option and value supplied
◆ setTimeout()
virtual bool xmltooling::SOAPTransport::setTimeout |
( |
long | timeout | ) |
|
|
pure virtual |
Sets the request timeout.
- Parameters
-
timeout | time to wait for a response in seconds, or -1 for no timeout |
- Returns
- true iff the transport supports request/response timeouts
◆ setTrustEngine()
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.
- Parameters
-
trustEngine | an X509TrustEngine instance, or nullptr |
credResolver | a CredentialResolver to supply the peer's trusted credentials, or nullptr |
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 |
- Returns
- true iff the transport supports the use of a TrustEngine
◆ setVerifyHost()
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.
- Parameters
-
verify | true iff the hostname should be verified against the server's certificate |
- Returns
- true iff the transport supports hostname verification
The documentation for this class was generated from the following file: