sipxtacklib  Version 3.3
Public Types | Public Member Functions | List of all members
XmlRpcResponse Class Reference

This object is used to create a XML-RPC response to a XmlRpcRequest request. More...

#include <XmlRpcResponse.h>

Public Types

enum  FaultCode {
  IllFormedContents = -1,
  InvalidMethodName = -2,
  UnregisteredMethod = -3,
  AuthenticationRequired = -4,
  EmptyParameterValue = -5,
  ConnectionFailure = -6,
  HttpFailure = -7
}
 Fault code values. More...
 

Public Member Functions

 XmlRpcResponse ()
 Contruct a XML-RPC response. More...
 
virtual ~XmlRpcResponse ()
 Destructor. More...
 
bool setResponse (UtlContainable *value)
 Values used by this subsystem in the fault code; Applications may use these or any integer value. More...
 
bool setFault (int faultCode, const char *faultString)
 Set the fault code and fault string in a fault response. More...
 
bool getResponse (UtlContainable *&value)
 Get the XML-RPC response. More...
 
void getFault (int *faultCode, UtlString &faultString)
 Get the fault code and fault string from the XML-RPC response. More...
 
bool parseXmlRpcResponse (UtlString &responseContent)
 Parse the XML-RPC response. More...
 
XmlRpcBodygetBody ()
 Get the content of the response. More...
 

Detailed Description

This object is used to create a XML-RPC response to a XmlRpcRequest request.

setResponse() is used for creating the response, and getResponse() is used for getting the value from the request. Furthermore, setFault() is for creating a fault response, and getFault() is used for getting the fault code and fault string in the fault response.

Member Enumeration Documentation

enum FaultCode

Fault code values.

Enumerator
IllFormedContents 

xmlrpc message was not well formed xml

InvalidMethodName 

name is not syntactically valid

UnregisteredMethod 

no server found for requested method

AuthenticationRequired 

request was not properly authenticated

EmptyParameterValue 

missing value for a required parameter

ConnectionFailure 

unable to connect to service

HttpFailure 

http returned a non-2xx status

Constructor & Destructor Documentation

Contruct a XML-RPC response.

~XmlRpcResponse ( )
virtual

Destructor.

Member Function Documentation

bool setResponse ( UtlContainable *  value)

Values used by this subsystem in the fault code; Applications may use these or any integer value.

Set the XML-RPC response value for the response

bool setFault ( int  faultCode,
const char *  faultString 
)

Set the fault code and fault string in a fault response.

This function will create a fault response

bool getResponse ( UtlContainable *&  value)

Get the XML-RPC response.

value for the param

void getFault ( int *  faultCode,
UtlString &  faultString 
)

Get the fault code and fault string from the XML-RPC response.

bool parseXmlRpcResponse ( UtlString &  responseContent)

Parse the XML-RPC response.

response content from XML-RPC request

XmlRpcBody * getBody ( )

Get the content of the response.


sipXtackLib home page