- include("xmlrpc.inc");
-
- $f = new xmlrpcmsg('examples.getStateName');
-
- print "<h3>Testing value serialization</h3>\n";
-
- $v = new xmlrpcval(23, "int");
- print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
- $v = new xmlrpcval("What are you saying? >> << &&");
- print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
-
- $v = new xmlrpcval(array(
- new xmlrpcval("ABCDEFHIJ"),
- new xmlrpcval(1234, 'int'),
- new xmlrpcval(1, 'boolean')),
- "array"
- );
-
- print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
-
- $v = new xmlrpcval(
- array(
- "thearray" => new xmlrpcval(
- array(
- new xmlrpcval("ABCDEFHIJ"),
- new xmlrpcval(1234, 'int'),
- new xmlrpcval(1, 'boolean'),
- new xmlrpcval(0, 'boolean'),
- new xmlrpcval(true, 'boolean'),
- new xmlrpcval(false, 'boolean')
- ),
- "array"
+
+include_once __DIR__ . "/../vendor/autoload.php";
+
+$req = new PhpXmlRpc\Request('examples.getStateName');
+
+print "<h3>Testing value serialization</h3>\n";
+
+$v = new PhpXmlRpc\Value(23, "int");
+print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
+$v = new PhpXmlRpc\Value("What are you saying? >> << &&");
+print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
+
+$v = new PhpXmlRpc\Value(
+ array(
+ new PhpXmlRpc\Value("ABCDEFHIJ"),
+ new PhpXmlRpc\Value(1234, 'int'),
+ new PhpXmlRpc\Value(1, 'boolean'),
+ ),
+ "array"
+);
+
+print "<PRE>" . htmlentities($v->serialize()) . "</PRE>";
+
+$v = new PhpXmlRpc\Value(
+ array(
+ "thearray" => new PhpXmlRpc\Value(
+ array(
+ new PhpXmlRpc\Value("ABCDEFHIJ"),
+ new PhpXmlRpc\Value(1234, 'int'),
+ new PhpXmlRpc\Value(1, 'boolean'),
+ new PhpXmlRpc\Value(0, 'boolean'),
+ new PhpXmlRpc\Value(true, 'boolean'),
+ new PhpXmlRpc\Value(false, 'boolean'),
+ ),
+ "array"
+ ),
+ "theint" => new PhpXmlRpc\Value(23, 'int'),
+ "thestring" => new PhpXmlRpc\Value("foobarwhizz"),
+ "thestruct" => new PhpXmlRpc\Value(
+ array(
+ "one" => new PhpXmlRpc\Value(1, 'int'),
+ "two" => new PhpXmlRpc\Value(2, 'int'),