Class xmlrpc_client
Object
|
+--xmlrpc_client
-
Direct Known Subclasses:
-
jsonrpc_client
- class
xmlrpc_client
Defined in xmlrpc_lib.js
Constructor Summary |
xmlrpc_client(<string> path, <string> server, <integer> port, <string> method)
|
Method Summary |
array
|
multiCall(<array> messages, <integer> timeout, <string> method, <boolean> fallback)
Send an array of request messages and return an array of responses.
|
xmlrpcresp
|
send(<mixed> msg, <integer> timeout, method)
Send an xmlrpc request.
|
void
|
setAcceptedCompression(<string> compmethod)
Enables/disables reception of compressed xmlrpc responses.
|
void
|
setCredentials(<string> username, <string> password, <integer> authtype)
Add some http BASIC AUTH credentials, used by the client to authenticate
|
void
|
setDebug(<integer> dbg)
Enables/disables the echoing to screen of the xmlrpc responses received
|
accepted_charset_encodings
Object accepted_charset_encodings
keepalive
Object keepalive
no_multicall
Object no_multicall
polling_queue
Object polling_queue
return_type
Object return_type
tid
Object tid
xmlrpc_client
xmlrpc_client(<string> path, <string> server, <integer> port, <string> method)
Parameters:
port
- optional. Defaults to 80 for http, 443 for https
method
- not in use yet. Valid values: 'https', 'http'
multiCall
array multiCall(<array> messages, <integer> timeout, <string> method, <boolean> fallback)
Send an array of request messages and return an array of responses.
Unless this.no_multicall has been set to true, it will try first
to use one single xmlrpc call to server method system.multicall, and
revert to sending many successive calls in case of failure.
This failure is also stored in this.no_multicall for subsequent calls.
Unfortunately, there is no server error code universally used to denote
the fact that multicall is unsupported, so there is no way to reliably
distinguish between that and a temporary failure.
If you are sure that server supports multicall and do not want to
fallback to using many single calls, set the fourth parameter to FALSE.
Parameters:
messages
- an array of xmlrpcmsg objects
timeout
- Not in use (yet). Connection timeout (in seconds) for every single request made
method
- The http protocol variant to be used. If undefined, defaults to the variant used at obj creation time. Not in use (yet)
fallback
- When true (the default value), upon receiveing an error during multicall, multiple single calls will be attempted
send
xmlrpcresp send(<mixed> msg, <integer> timeout, method)
Parameters:
msg
- The message object, or an array of messages for using multicall, or the complete xml representation of a request
timeout
- Connection timeout, in seconds. If unspecified, or 0 a platform specific timeout will apply. Used only with async calls and callback faunctions.
if
- string: 'method' - if left unspecified, the http protocol chosen during creation of the object will be used if object: callback function that accepts an xmlrpcresp obj as parameter
setAcceptedCompression
void setAcceptedCompression(<string> compmethod)
Enables/disables reception of compressed xmlrpc responses.
Note that enabling reception of compressed responses merely adds some standard
http headers to xmlrpc requests. It is up to the xmlrpc server to return
compressed responses when receiving such requests.
Parameters:
compmethod
- either 'gzip', 'deflate', 'any', 'auto' or ''. 'auto' means the javascript host (eg. the browser) will decide what to do
setCredentials
void setCredentials(<string> username, <string> password, <integer> authtype)
Add some http BASIC AUTH credentials, used by the client to authenticate
Parameters:
authtype
- Not in use (yet). See curl_setopt man page for supported auth types. Defaults to CURLAUTH_BASIC (basic auth)
setDebug
void setDebug(<integer> dbg)
Enables/disables the echoing to screen of the xmlrpc responses received
Parameters:
dbg
- values 0, 1 and 2 are supported (2 = echo sent msg too, before received response)
Documentation generated by
JSDoc on Tue Jun 26 14:36:04 2007