xmltooling::SOAPTransport Class Reference

Encapsulates a transport layer protocol for sending/receiving messages. More...

#include <xmltooling/soap/SOAPTransport.h>

Inheritance diagram for xmltooling::SOAPTransport:

xmltooling::HTTPSOAPTransport xmltooling::OpenSSLSOAPTransport List of all members.

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...

Detailed Description

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.


Member Function Documentation

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

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

virtual bool xmltooling::SOAPTransport::isConfidential (  )  const [pure virtual]

Indicates whether transport provides confidentiality.

Returns:
true iff transport layer 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.

Returns:
reference to a stream containing the response, if any

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.

Parameters:
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.

Parameters:
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.

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

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

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.

Parameters:
credential a Credential instance, or NULL
Returns:
true iff the transport supports the use of the Credential

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.

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

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

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.

Parameters:
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
Returns:
true iff the transport supports the use of a 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.

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:
Generated on Mon Oct 19 14:18:35 2009 for xmltooling by  doxygen 1.4.7