sipxtacklib
Version 3.3
|
This object is used to create a XML-RPC request to a specific remote XML-RPC server. More...
#include <XmlRpcRequest.h>
Public Member Functions | |
XmlRpcRequest (Url &uri, const char *methodName) | |
Contruct an XML-RPC request for a given method. More... | |
virtual | ~XmlRpcRequest () |
Destructor. More... | |
bool | execute (XmlRpcResponse &response, int timeoutMilliSeconds=XML_RPC_TIMEOUT, UtlBoolean usePersistentConnections=TRUE) |
Execute the named procedure on the remote server. More... | |
bool | addParam (UtlContainable *value) |
Add an atomic param to the XML-RPC request. More... | |
Friends | |
class | XmlRpcTest |
class | ResultSetRpcTest |
This object is used to create a XML-RPC request to a specific remote XML-RPC server.
The caller is required to create this object for each XML-RPC request.
The caller uses the addParam(), addArray() and/or addStruct() functions to build up XML-RPC request content in XmlRpcBody.
All the param types must be UtlContainable. Here is the mapping from XML-RPC types to UtlContainable types:
<i8> is a SIPfoundry extension to XML-RPC that is not compatible with other XML-RPC implementations. <double> and <base64> are currently not supported.
The execute() function closes the XML-RPC request frame and sends the request to the remote server specified in the Url. The execute() function receives the XmlRpcResponse from the remote server. If the return is true, the caller can use getResponse() to obtain the response value. If the return is false, the caller can use getFault() in XmlRpcResponse to get the fault code and fault string.
XmlRpcRequest | ( | Url & | uri, |
const char * | methodName | ||
) |
Contruct an XML-RPC request for a given method.
uri | uri type can only be either http or https |
methodName | name of the method in XML-RPC request |
|
virtual |
Destructor.
bool execute | ( | XmlRpcResponse & | response, |
int | timeoutMilliSeconds = XML_RPC_TIMEOUT , |
||
UtlBoolean | usePersistentConnections = TRUE |
||
) |
Execute the named procedure on the remote server.
If the return is false, the caller can use response.getFault() to obtain the fault code and fault string.
response | response returned from the remote server |
bool addParam | ( | UtlContainable * | value | ) |
Add an atomic param to the XML-RPC request.
value for the param
|
friend |
|
friend |