X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=demo%2Fclient%2Fwrap.php;h=0b3022d950824dee820cad626fd2daefbbaa3166;hb=891efe4262d3cc5a379e0454f1f92c9dbdade9f7;hp=4dde5ba023fb189dff541327e8d6a12427aa1bc6;hpb=749bcf1b412822e08dbcab366cfbf7ad1cb77db0;p=plcapi.git diff --git a/demo/client/wrap.php b/demo/client/wrap.php index 4dde5ba..0b3022d 100644 --- a/demo/client/wrap.php +++ b/demo/client/wrap.php @@ -21,31 +21,31 @@ $resp = $client->send(new PhpXmlRpc\Request('system.listMethods')); if ($resp->faultCode()) { echo "

Server methods list could not be retrieved: error {$resp->faultCode()} '" . htmlspecialchars($resp->faultString()) . "'

\n"; } else { - $testCase = ''; - $wrapper = new PhpXmlRpc\Wrapper(); echo "

Server methods list retrieved, now wrapping it up...

\n\n"; - if ($testCase) { - echo "Now testing function $testCase: remote method to convert U.S. state number into state name"; + flush(); + + if ($callable) { + echo "Now testing function for remote method to convert U.S. state number into state name"; $stateNum = rand(1, 51); - $stateName = $testCase($stateNum, 2); - echo "State number $stateNum is " . htmlspecialchars($stateName); + // the 2nd parameter gets added to the closure - it is teh debug level to be used for the client + $stateName = $callable($stateNum, 2); } } ?>