Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

HttpTransport Class Reference

The HTTP transport implementation for SOAP. More...

#include <HttpTransport.hpp>

Inheritance diagram for HttpTransport::

Transport List of all members.

Public Types

enum  Type { POST, MPOST }
 HTTP category, Only POST is used currently, MPOST is not supported yet. More...


Public Methods

 HttpTransport (Url url)
 Create HTTP transport with provided URL as remote address, set HTTP category default to POST. More...

 HttpTransport (std::string &strUrl)
 Create HTTP transport with provided remote address as URL-string, set HTTP category default to POST. More...

 ~HttpTransport ()
bool Init ()
 Initialize HTTP transport by establishing a channel to the remote end. More...

bool GetStatus (const std::string &p_HttpPacket)
 Obtain the status of the HTTP packet validity. More...

void SetProperty (const std::string &p_Property, const std::string &p_Value)
 Set properties of HTTP transport such as additional Header fields like SOAPAction. More...

const Transportoperator>> (std::string &p_Payload)
 Read from a HTTP transport handler and store read payload. More...

const Transportoperator<< (const std::string &p_Payload)
 Write a given payload by using HTTP transport as carrier. More...


Private Types

typedef std::vector< std::pair<
std::string, std::string> > 
Header_t

Private Methods

void HTTPBind (const std::string &p_Payload)
 Build a HTTP packet with a given payload & additional HTTP properties. More...

void HTTPValidate (const std::string &p_HttpPacket)
 Validate HTTP packets received from the channel. More...

void GetPayLoad (const std::string &p_HttpPacket, std::string::size_type &offset)
 Extract payload from the HTTP packet starting from a given offset. More...

void Error (const char *err)
 Report error on read/write. More...


Private Attributes

Type m_Typ
 Type of the HTTP; POST or MPOST. More...

std::ostringstream m_OutMsg
 Holds outgoing HTTP packet. More...

std::istringstream m_InMsg
 Holds incoming HTTP packet. More...

std::string m_PayLoad
 Holds the payload. More...

Header_t m_AdditionalHeader
 Additional Header fields as name value pairs. More...


Detailed Description

The HTTP transport implementation for SOAP.

Implements HTTP transport as SOAP-Envelop carrier, for sending/receiving SOAP messages with HTTP 1.1/1.0; This implementation abstract the Transport layer for the SOAP payloads

Definition at line 86 of file HttpTransport.hpp.


Member Typedef Documentation

typedef std::vector< std::pair< std::string, std::string > > HttpTransport::Header_t< std::pair<std::string, std::string> > [private]
 

Definition at line 129 of file HttpTransport.hpp.


Member Enumeration Documentation

enum HttpTransport::Type
 

HTTP category, Only POST is used currently, MPOST is not supported yet.

Enumeration values:
POST  
MPOST  

Definition at line 90 of file HttpTransport.hpp.


Constructor & Destructor Documentation

HttpTransport::HttpTransport ( Url url ) [inline]
 

Create HTTP transport with provided URL as remote address, set HTTP category default to POST.

Definition at line 93 of file HttpTransport.hpp.

HttpTransport::HttpTransport ( std::string & strUrl ) [inline]
 

Create HTTP transport with provided remote address as URL-string, set HTTP category default to POST.

Definition at line 96 of file HttpTransport.hpp.

HttpTransport::~HttpTransport ( )
 

Shutdown any established channel

Definition at line 77 of file CVS/Base/HttpTransport.cpp.


Member Function Documentation

void HttpTransport::Error ( const char * err ) [private]
 

Report error on read/write.

Report error on read/write

Definition at line 352 of file CVS/Base/HttpTransport.cpp.

Referenced by HTTPValidate().

void HttpTransport::GetPayLoad ( const std::string & p_HttpPacket,
std::string::size_type & offset ) [private]
 

Extract payload from the HTTP packet starting from a given offset.

Extract payload from the HTTP packet starting from a given offset

Definition at line 302 of file CVS/Base/HttpTransport.cpp.

Referenced by HTTPValidate().

bool HttpTransport::GetStatus ( const std::string & p_HttpPacket ) [virtual]
 

Obtain the status of the HTTP packet validity.

Obtain the status of the HTTP packet validity.

Parameters:
p_HttpPacket   HTTP packet

Returns:
Status of the HTTP packet validity.

Reimplemented from Transport.

Definition at line 218 of file CVS/Base/HttpTransport.cpp.

void HttpTransport::HTTPBind ( const std::string & p_Payload ) [private]
 

Build a HTTP packet with a given payload & additional HTTP properties.

Build a HTTP packet with a given payload & additional HTTP properties Uses HTTP 1.1; if HTTP 1.0 is required we have to manage with setting the properties. Only POST is supported for the time being; hope to support M-POST

Definition at line 182 of file CVS/Base/HttpTransport.cpp.

Referenced by operator<<().

void HttpTransport::HTTPValidate ( const std::string & p_HttpPacket ) [private]
 

Validate HTTP packets received from the channel.

Validate HTTP packets received from the channel.

Parameters:
p_HttpPacket   HTTP packet

Returns:
Status code is set

Definition at line 233 of file CVS/Base/HttpTransport.cpp.

Referenced by GetStatus(), and operator>>().

bool HttpTransport::Init ( ) [virtual]
 

Initialize HTTP transport by establishing a channel to the remote end.

Initialize HTTP transport by establishing a channel to the remote end.

Returns:
Status of the channel establishment to the remote end provided by m_Url @trows Channel Exception

Reimplemented from Transport.

Definition at line 89 of file CVS/Base/HttpTransport.cpp.

void HttpTransport::SetProperty ( const std::string & p_Property,
const std::string & p_Value ) [virtual]
 

Set properties of HTTP transport such as additional Header fields like SOAPAction.

Set properties of HTTP transport such as additional Header fields like SOAPAction.

Parameters:
p_Property   Property name; such as SOAPAction
p_Value   Property value

Reimplemented from Transport.

Definition at line 115 of file CVS/Base/HttpTransport.cpp.

const Transport & HttpTransport::operator<< ( const std::string & p_Payload ) [virtual]
 

Write a given payload by using HTTP transport as carrier.

Write a given payload to the established channel by using HTTP transport as carrier.

Reimplemented from Transport.

Definition at line 159 of file CVS/Base/HttpTransport.cpp.

const Transport & HttpTransport::operator>> ( std::string & p_Payload ) [virtual]
 

Read from a HTTP transport handler and store read payload.

Read from a HTTP transport handler and store read payload.

Parameters:
p_Payload   SOAP Envelop as Payload for HTTP transport

Reimplemented from Transport.

Definition at line 128 of file CVS/Base/HttpTransport.cpp.


Member Data Documentation

Header_t HttpTransport::m_AdditionalHeader [private]
 

Additional Header fields as name value pairs.

Definition at line 137 of file HttpTransport.hpp.

std::istringstream HttpTransport::m_InMsg [private]
 

Holds incoming HTTP packet.

Definition at line 134 of file HttpTransport.hpp.

std::ostringstream HttpTransport::m_OutMsg [private]
 

Holds outgoing HTTP packet.

Definition at line 133 of file HttpTransport.hpp.

std::string HttpTransport::m_PayLoad [private]
 

Holds the payload.

Definition at line 136 of file HttpTransport.hpp.

Type HttpTransport::m_Typ [private]
 

Type of the HTTP; POST or MPOST.

Definition at line 131 of file HttpTransport.hpp.


The documentation for this class was generated from the following files: Axis C++ Client Lib - User's Guide

Copyright © 2001 SL_OpenSource XML Project. All Rights Reserved