Implemented by
[scriptable, uuid(37127241-1e6e-46aa-ba87-601d41bb47df)]
interface nsIXmlRpcClient : nsISupports
Constants
const
unsigned long
INT = 1
const
unsigned long
BOOLEAN = 2
const
unsigned long
STRING = 3
const
unsigned long
DOUBLE = 4
const
unsigned long
DATETIME = 5
const
unsigned long
ARRAY = 6
const
unsigned long
STRUCT = 7
Attributes
The most recent XML-RPC fault from returned from this server. null if the last call didn't return an XML-RPC fault.
readonly attribute
nsIXmlRpcFault
fault
Wether or not a call is in progress
readonly attribute
boolean
inProgress
The most recent HTTP status code returned from this server null if the server was unreachable or not yet contacted.
readonly attribute
unsigned long
responseStatus
readonly attribute
unsigned long
responseString
The most recent XML-RPC call result returned from this server. null if the last call didn't return a valid result
readonly attribute
nsISupports
result
The URL of the XML-RPC server
readonly attribute
nsIURL
serverURL
Methods
Call remote method methodName asynchronously with given arguments.
Supported arguments are:
nsISupportsPRUint8, nsISupportsPRUint16,
nsISupportsPRInt16, nsISupportsPRInt32: <i4>
nsISupportsPRBool: <boolean>
nsISupportsChar, nsISupportsCString: <string>
nsISupportsFloat, nsISupportsDouble: <double>
nsISupportsPRTime: <dateTime.iso8601>
nsIInputStream: <base64>
nsISupportsArray: <array>
nsIDictionary: <struct>
Note that both nsISupportsArray and nsIDictionary can only hold any of
the supported input types.
Return value will be converted as follows:
<i4> or <int>: nsISupportsPRInt32
<boolean>: nsISupportsPRBool
<string>: nsISupportsCString
<double>: nsISupportsDouble
<dateTime.iso8601>: nsISupportsPRTime
<base64>: nsISupportsCString
<array>: nsISupportsArray
<struct>: nsIDictionary
<fault>s (server side errors) are indicated by returning
NS_ERROR_FAILURE. Via nsIXPConnect::GetPendingException()->data a
nsIXmlRpcFault object can be retreieved with more information on the
fault.
@param listener A nsIXmlRpcClientListener that will get notified
of XML-RPC events.
@param context A context to be passed on to the listener.
@param methodName Remote method to call.
@param arguments Array of arguments to pass to remote method.
@return Return value of remote method.
void
asyncCall(in nsIXmlRpcClientListener listener, in nsISupports ctxt, in string methodName, [array, size_is(count)] in nsISupports arguments, in PRUint32 count)
Clear authentication info.
void
clearAuthentication(in string username, in string password)
Convenience: return the correct nsISupportsPrimitive for a given XML-RPC
type, or nsISupportsArray or nsIDictionary. 'base64' isn't supported.
No QueryInterface call is needed, the object has been QueryInterfaced to
the correct interface.
@param type One of the listed constants.
@param uuid The uuid of the returned object. No QI call
needed.
@param nsQIResult The apropriate XPCOM object.
void
createType(in unsigned long type, out nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result)
Simple XML-RPC client interface.
Set server URL. Call this before using this object.
@param serverURL URL of server side object on which methods should
be called.
void
init(in string serverURL)
Set authentication info if needed. Both parameters must be specified for authentication to be enabled. @param username username to be used if asked to authenticate @param password password to be used if asked to authenticate
void
setAuthentication(in string username, in string password)
Compare to: