Hello,
I have the same problem. I did the same but Im getting the error.
What I am doing wrong? Could you help me?
Thank you!
$functionname = 'core_course_create_courses';
$curs = new stdClass();
$curs->fullname = 'Curs de prova WS';
$curs->shortname = 'PWS';
$curs->category = 17;
$cursos = array($curs);
$params = array('courses'=> $cursos);
/// SOAP CALL
$serverurl = $domainname . '/webservice/soap/server.php'. '?wsdl=1&wstoken=' . $token;
$client = new SoapClient($serverurl);
try {
$resp = $client->__soapCall($functionname, $params);
} catch (Exception $e) {
print_r($e);
}
if (isset($resp)) {
print_r($resp);
}
error:
[function] => __soapCall
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => core_course_create_courses
[1] => Array
(
[courses] => Array
(
[0] => stdClass Object
(
[fullname] => Curs de prova WS
[shortname] => PWS
[category] => 17
)
)