first commit
This commit is contained in:
9
lib/phpxmlrpc/extras/rsakey.pem
Normal file
9
lib/phpxmlrpc/extras/rsakey.pem
Normal file
@@ -0,0 +1,9 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIBOgIBAAJBAM12w6/J20HMj0V9VC24xPFQG9RKSDt8vmviM+tnc1BgCrzPyF1v
|
||||
3/rWGoWDjkJrE9WFOeqIjJHeEWWT4uKq2ZkCAwEAAQJAZZYJ7Nld+et9DvuHak/H
|
||||
uBRGnjDYA+mKcObXitWMUzk2ZodL8UoCP1J9kKqV8Zp/l2cBZkLo0aWTN94sWkHy
|
||||
rQIhAOhxWxRXSZ4kArIQqZnDG9JgtOAeaaFso/zpxIHpN6OrAiEA4klzl+rUc32/
|
||||
7SDcJYa9j5vehp1jCTnkN+n0rujTM8sCIAGwMRUovSQk5tAcRt8TB7SzdxzZm7LM
|
||||
czR3DjJTW1AZAiEAlYN+svPgJ+cAdwdtLgZXHZoZb8xx8Vik6CTXHPKNCf0CIBQL
|
||||
zF4Qp8/C+gjsXtEZJvhxY7i1luHn6iNwNnE932r3
|
||||
-----END RSA PRIVATE KEY-----
|
||||
52
lib/phpxmlrpc/extras/test.pl
Normal file
52
lib/phpxmlrpc/extras/test.pl
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
use Frontier::Client;
|
||||
|
||||
my $serverURL='http://phpxmlrpc.sourceforge.net/server.php';
|
||||
|
||||
# try the simplest example
|
||||
|
||||
my $client = Frontier::Client->new( 'url' => $serverURL,
|
||||
'debug' => 0, 'encoding' => 'iso-8859-1' );
|
||||
my $resp = $client->call("examples.getStateName", 32);
|
||||
|
||||
print "Got '${resp}'\n";
|
||||
|
||||
# now send a mail to nobody in particular
|
||||
|
||||
$resp = $client->call("mail.send", ("edd", "Test",
|
||||
"Bonjour. Je m'appelle Gérard. Mañana. ", "freddy", "", "",
|
||||
'text/plain; charset="iso-8859-1"'));
|
||||
|
||||
if ($resp->value()) {
|
||||
print "Mail sent OK.\n";
|
||||
} else {
|
||||
print "Error sending mail.\n";
|
||||
}
|
||||
|
||||
# test echoing of characters works fine
|
||||
|
||||
$resp = $client->call("examples.echo", 'Three "blind" mice - ' .
|
||||
"See 'how' they run");
|
||||
print $resp . "\n";
|
||||
|
||||
# test name and age example. this exercises structs and arrays
|
||||
|
||||
$resp = $client->call("examples.sortByAge",
|
||||
[ { 'name' => 'Dave', 'age' => 35},
|
||||
{ 'name' => 'Edd', 'age' => 45 },
|
||||
{ 'name' => 'Fred', 'age' => 23 },
|
||||
{ 'name' => 'Barney', 'age' => 36 } ] );
|
||||
|
||||
my $e;
|
||||
foreach $e (@$resp) {
|
||||
print $$e{'name'} . ", " . $$e{'age'} . "\n";
|
||||
}
|
||||
|
||||
# test base64
|
||||
|
||||
$resp = $client->call("examples.decode64",
|
||||
$client->base64("TWFyeSBoYWQgYSBsaXR0bGUgbGFtYiBTaGUgd" .
|
||||
"GllZCBpdCB0byBhIHB5bG9u"));
|
||||
|
||||
print $resp . "\n";
|
||||
37
lib/phpxmlrpc/extras/test.py
Normal file
37
lib/phpxmlrpc/extras/test.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/local/bin/python
|
||||
|
||||
from xmlrpclib import *
|
||||
import sys
|
||||
|
||||
server = Server("http://phpxmlrpc.sourceforge.net/server.php")
|
||||
|
||||
try:
|
||||
print "Got '" + server.examples.getStateName(32) + "'"
|
||||
|
||||
r = server.mail.send("edd", "Test",
|
||||
"Bonjour. Je m'appelle Gérard. Mañana. ", "freddy", "", "",
|
||||
'text/plain; charset="iso-8859-1"')
|
||||
if r:
|
||||
print "Mail sent OK"
|
||||
else:
|
||||
print "Error sending mail"
|
||||
|
||||
|
||||
r = server.examples.echo('Three "blind" mice - ' + "See 'how' they run")
|
||||
print r
|
||||
|
||||
# name/age example. this exercises structs and arrays
|
||||
|
||||
a = [ {'name': 'Dave', 'age': 35}, {'name': 'Edd', 'age': 45 },
|
||||
{'name': 'Fred', 'age': 23}, {'name': 'Barney', 'age': 36 }]
|
||||
r = server.examples.sortByAge(a)
|
||||
print r
|
||||
|
||||
# test base 64
|
||||
b = Binary("Mary had a little lamb She tied it to a pylon")
|
||||
b.encode(sys.stdout)
|
||||
r = server.examples.decode64(b)
|
||||
print r
|
||||
|
||||
except Error, v:
|
||||
print "XML-RPC Error:",v
|
||||
1
lib/phpxmlrpc/extras/workspace.testPhpServer.fttb
Normal file
1
lib/phpxmlrpc/extras/workspace.testPhpServer.fttb
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user