A soap request. More...
#include <libppbase/base_soap/SOAPRequest.h>
Public Types | |
enum | { contextUnknown = 0, contextUser = 1, contextSupport = 2, contextSystem = 4 } |
Contexts. More... | |
Public Member Functions | |
SOAPRequest (const SOAPRequest &request) | |
Copy constructor. | |
SOAPRequest (xercesc::DOMImplementation *implementation, xercesc::DOMBuilder *parser, xercesc::DOMDocument *document) | |
Constructor that creates a request on the server side (and response on the client side). | |
SOAPRequest (const base::String &classname, const base::String &method, const base::String &instance="") | |
Constructor that creates a request on the client side. | |
SOAPRequest (const base::String &classname, const base::String &method, int instance) | |
Constructor that creates a request on the client side. | |
~SOAPRequest () | |
Destructor. | |
void | addAttachment (SOAPAttachment *attachment, bool own=false) |
Adds an attachment. | |
SOAPResponse * | createResponse () |
Creates a response object for this request. | |
SOAPResponse * | createResponse (const SOAPException &excp) |
Creates a response object for this request, containing an exception. | |
SOAPAttachment * | getAttachment (const base::String &id, bool throwex=true) const |
Gets an attachment. | |
std::vector< SOAPAttachment * > | getAttachments () const |
Gets all attachments. | |
base::String | getClass () const |
Gets the class name of this soap request. | |
int | getContext () const |
Gets the context of this soap request. | |
base::String | getInstance () const |
Gets the instance of this soap request. | |
base::String | getMethod () const |
Gets the method of this soap request. | |
base::String | getProgram () const |
Gets the calling program name. | |
base::String | getQName (const base::String &name) const |
Gets the qualified name for a local node name (prepends prefix). | |
base::String | getRemoteAddr () const |
Gets the calling remote (ip) address. | |
SOAPResponse * | getResponse () const |
Returns the internal response object. | |
int | getUserId () const |
Gets the calling user id of this soap request. | |
base::String | getUserName () const |
Gets the calling user name. | |
void | setClass (const base::String &classname) |
Set (change) class name. | |
void | setContext (int context) |
Set (change) context. | |
void | setInstance (const base::String &instance) |
Set (change) instance. | |
void | setMethod (const base::String &method) |
Set (change) method name. | |
void | setProgram (const base::String &program) |
Set (change) calling program name. | |
void | setRemoteAddr (const base::String &addr) |
Set (change) calling remote (ip) address. | |
void | setResponse (SOAPResponse *response) |
Set the response. | |
void | setUserId (int userid) |
Set (change) calling user id. | |
void | setUserName (const base::String &username) |
Set (change) calling user name. | |
void | toXML (xercesc::MemBufFormatTarget *target) const |
Serializes this request into xml. | |
base::String | toXML () const |
Returns xml representation of this request. | |
Protected Member Functions | |
void | constructor (const base::String &classname, const base::String &method, const base::String &instance) |
Constructor helper. | |
Protected Attributes | |
std::vector< SOAPAttachment * > | _attachments |
Attachment list. | |
xercesc::DOMElement * | _header |
The soap header. | |
xercesc::DOMImplementation * | _implementation |
The dom implementation. | |
std::vector< bool > | _own |
Attachment ownership. | |
xercesc::DOMBuilder * | _parser |
The parser that owns the dom document. | |
base::String | _prefix |
Namespace prefix. | |
SOAPResponse * | _response |
The response to this request. |
A soap request.
anonymous enum |
base_soap::SOAPRequest::SOAPRequest | ( | const SOAPRequest & | request | ) |
Copy constructor.
request | the request to copy |
base_soap::SOAPRequest::SOAPRequest | ( | xercesc::DOMImplementation * | implementation, | |
xercesc::DOMBuilder * | parser, | |||
xercesc::DOMDocument * | document | |||
) |
Constructor that creates a request on the server side (and response on the client side).
implementation | a dom implementation | |
parser | a dom parser | |
document | the document parsed and owned by the parser |
base_soap::SOAPRequest::SOAPRequest | ( | const base::String & | classname, | |
const base::String & | method, | |||
const base::String & | instance = "" | |||
) |
Constructor that creates a request on the client side.
classname | class to call | |
method | method to call | |
instance | instance to use |
base_soap::SOAPRequest::SOAPRequest | ( | const base::String & | classname, | |
const base::String & | method, | |||
int | instance | |||
) |
Constructor that creates a request on the client side.
classname | class to call | |
method | method to call | |
instance | instance to use |
void base_soap::SOAPRequest::addAttachment | ( | SOAPAttachment * | attachment, | |
bool | own = false | |||
) |
Adds an attachment.
attachment | the attachment to add | |
own | ownership flag |
void base_soap::SOAPRequest::constructor | ( | const base::String & | classname, | |
const base::String & | method, | |||
const base::String & | instance | |||
) | [protected] |
Constructor helper.
classname | class to call | |
method | method to call | |
instance | instance to use |
SOAPResponse* base_soap::SOAPRequest::createResponse | ( | ) |
Creates a response object for this request.
SOAPResponse* base_soap::SOAPRequest::createResponse | ( | const SOAPException & | excp | ) |
Creates a response object for this request, containing an exception.
excp | the exception |
SOAPAttachment* base_soap::SOAPRequest::getAttachment | ( | const base::String & | id, | |
bool | throwex = true | |||
) | const |
Gets an attachment.
id | the attachment id | |
throwex | true to throw an exception if the attachment does not exist, false to return NULL |
std::vector<SOAPAttachment*> base_soap::SOAPRequest::getAttachments | ( | ) | const |
Gets all attachments.
base::String base_soap::SOAPRequest::getClass | ( | ) | const |
Gets the class name of this soap request.
int base_soap::SOAPRequest::getContext | ( | ) | const |
Gets the context of this soap request.
base::String base_soap::SOAPRequest::getInstance | ( | ) | const |
Gets the instance of this soap request.
base::String base_soap::SOAPRequest::getMethod | ( | ) | const |
Gets the method of this soap request.
base::String base_soap::SOAPRequest::getProgram | ( | ) | const |
Gets the calling program name.
base::String base_soap::SOAPRequest::getQName | ( | const base::String & | name | ) | const |
Gets the qualified name for a local node name (prepends prefix).
name | the local name |
base::String base_soap::SOAPRequest::getRemoteAddr | ( | ) | const |
Gets the calling remote (ip) address.
SOAPResponse* base_soap::SOAPRequest::getResponse | ( | ) | const |
Returns the internal response object.
int base_soap::SOAPRequest::getUserId | ( | ) | const |
Gets the calling user id of this soap request.
base::String base_soap::SOAPRequest::getUserName | ( | ) | const |
Gets the calling user name.
void base_soap::SOAPRequest::setClass | ( | const base::String & | classname | ) |
Set (change) class name.
classname | the new class name |
void base_soap::SOAPRequest::setContext | ( | int | context | ) |
Set (change) context.
context | the new context |
void base_soap::SOAPRequest::setInstance | ( | const base::String & | instance | ) |
Set (change) instance.
instance | the new instance |
void base_soap::SOAPRequest::setMethod | ( | const base::String & | method | ) |
Set (change) method name.
method | the new method name |
void base_soap::SOAPRequest::setProgram | ( | const base::String & | program | ) |
Set (change) calling program name.
program | the new program name |
void base_soap::SOAPRequest::setRemoteAddr | ( | const base::String & | addr | ) |
Set (change) calling remote (ip) address.
addr | the new calling remote (ip) address |
void base_soap::SOAPRequest::setResponse | ( | SOAPResponse * | response | ) |
Set the response.
response | the response |
void base_soap::SOAPRequest::setUserId | ( | int | userid | ) |
Set (change) calling user id.
userid | the new user id |
void base_soap::SOAPRequest::setUserName | ( | const base::String & | username | ) |
Set (change) calling user name.
username | the new calling user name |
void base_soap::SOAPRequest::toXML | ( | xercesc::MemBufFormatTarget * | target | ) | const |
Serializes this request into xml.
target | returns the xml representation |
base::String base_soap::SOAPRequest::toXML | ( | ) | const |
Returns xml representation of this request.