forked from extern/egroupware
Add more printed comments; change to use www.phpgroupware.org
This commit is contained in:
parent
093e6d006b
commit
17dd3eb457
@ -8,28 +8,30 @@ import sys
|
|||||||
server = Server("http://www.phpgroupware.org/cvsdemo/xmlrpc.php");
|
server = Server("http://www.phpgroupware.org/cvsdemo/xmlrpc.php");
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print "Listing methods:"
|
print "Listing methods:\n"
|
||||||
r = server.system.listMethods();
|
r = server.system.listMethods();
|
||||||
print r
|
print r
|
||||||
|
|
||||||
print "Trying to login:"
|
print "\nTrying to login:\n"
|
||||||
up = {'domain': 'default', 'username': 'demo', 'password': 'guest'}
|
up = {'domain': 'default', 'username': 'demo', 'password': 'guest'}
|
||||||
l = server.system.login(up);
|
l = server.system.login(up);
|
||||||
print l
|
print l
|
||||||
|
|
||||||
|
print "\nTrying name/age struct/array test:\n"
|
||||||
# name/age example. this exercises structs and arrays
|
# name/age example. this exercises structs and arrays
|
||||||
a = [ {'name': 'Dave', 'age': 35}, {'name': 'Edd', 'age': 45 },
|
a = [ {'name': 'Dave', 'age': 35}, {'name': 'Edd', 'age': 45 },
|
||||||
{'name': 'Fred', 'age': 23}, {'name': 'Barney', 'age': 36 }]
|
{'name': 'Fred', 'age': 23}, {'name': 'Barney', 'age': 36 }]
|
||||||
r = server.examples.sortByAge(a)
|
r = server.examples.sortByAge(a)
|
||||||
print r
|
print r
|
||||||
|
|
||||||
|
print "\nTrying base 64 test:\n"
|
||||||
# test base 64
|
# test base 64
|
||||||
b = Binary("Mary had a little lamb She tied it to a pylon")
|
b = Binary("Mary had a little lamb She tied it to a pylon")
|
||||||
b.encode(sys.stdout)
|
b.encode(sys.stdout)
|
||||||
r = server.examples.decode64(b)
|
r = server.examples.decode64(b)
|
||||||
print r
|
print r
|
||||||
|
|
||||||
print "Trying to logout:"
|
print "\nTrying to logout:\n"
|
||||||
sk = {'sessionid': l['sessionid'], 'kp3': l['kp3']}
|
sk = {'sessionid': l['sessionid'], 'kp3': l['kp3']}
|
||||||
r = server.system.logout(sk);
|
r = server.system.logout(sk);
|
||||||
print r
|
print r
|
||||||
|
Loading…
Reference in New Issue
Block a user