by Pedro Laginha.
Hi,
I am trying to write a small script using SOAP to get the contents of core_webservice_get_site_info call. The code I wrote is:
<?php
// Declares
$token = "638bfd64ea2a087de2cb514dab1efbcc";
$serverUrl = "http://<my_moodle_url>/webservice/soap/server.php?wsdl=1&wstoken=" . $token;
$functionname = 'core_webservice_get_site_info';
echo "<pre>\n";
// Soap client object
$client = new SoapClient($serverUrl);
// Execution and output
try {
$resp = $client->__soapCall($functionname);
} catch (Exception $e) {
print_r($e);
}
if (isset($resp)) {
print_r($resp);
}
echo "</pre>\n";
?>
This code returns an empty output ("<pre></pre>"). Anyone knows why is this happening? I'm only curious about this call, that's not blocker for me, I just wanted to test the output.
Thank's in advance.
Pedro L.