xmlrpc.ServerProxy
Creates a proxy object which resemble a remote service.Method calls to this proxy will result in calls to the service.
constructor
ServerProxy(url, methodNames=[], user=null, pass=null)
The parameters are interpreted as shown in the examples:
parameters:
The parameters are interpreted as shown in the examples:
- using introspection for methodname retrieval:
ServerProxy("url")
- method names given:
ServerProxy("url", ["methodName1", ...])
- method names given and using HTTP authentication:
ServerProxy("url", ["methodName1", ...], "user", "pass")
- using introspection and HTTP authentication:
ServerProxy("url", "user", "pass")
parameters:
- url The URL of the service providing the methods.
- methodNames An array of names of known methods the service provides.
An XMLRPCMethod will be constructed for each method name and is added to the service object.
If no methods are given then introspection is used to get the methodnames from the server.
- user The user name for HTTP authentication.
- pass The password for HTTP authentication.
instance methods
- add(methodNames)
Adds XMLRPCMethods to the service.
parameters:- methodNames An array of names of known methods the service provides.
An XMLRPCMethod will be constructed for each method name and is added to the service object.
- methodNames An array of names of known methods the service provides.
An XMLRPCMethod will be constructed for each method name and is added to the service object.
- introspect()
Invokes system.listMethods() and adds the returned methods to the service.
- setAuthentication(user, pass)
Sets username and password for HTTP Authentication for all methods of this service..
parameters:- user The username for HTTP authentication.
- pass The password for HTTP authentication.
instance properties
- url
The URL of the service providing the methods.
Changing this property will not effect the already constructed XMLRPCMethod objects.
- ...
All remote methods and objects become part of the service.
E.g. the remote method "system.listMethods" would be:
sevice.system.listMethods
The remote method "echo" would be:
sevice.echo