对于在线学校平台来说,这是一个非常具体的问题。
我正在尝试使用他们的API来获取所有学生的列表(开始)。但我甚至不能让它跑起来。
在他们的手册中(只有2个!)示例,但它们有点复杂。
这是我有的,但我只打印出"19“。
<?php
class SmartschoolConnection implements SmartSOAP {
// URL opbouwen vanuit constante
function getURL() {
return "https://myplatform.smartschool.be/Webservices/V3?wsdl";
}
// Alle accounts ophalen
function getAllAccountsExtended($sGroup) {
try {
$client = @new SoapClient($this->getURL());
} catch (SoapFault $e) {
return $e->faultstring();
}
$encoded = $client->__soapCall("getAllAccountsExtended", array("MyWebservicesPassword",$sGroup,'1'));
$decoded = json_decode($encoded, TRUE);
return $decoded;
}
}
$smartschool = new SmartschoolConnection;
$pupils = $smartschool->getAllAccountsExtended("Klassen");
print_r($pupils);
?>发布于 2016-11-15 22:23:02
好吧,似乎我没有在Smartschool中为每个组设置唯一的字段。这就是为什么它会给出错误19,似乎是"Parent-id不存在“。尽管我在手册里找不到这些错误代码...
发布于 2020-01-30 03:23:36
在他们的手册中,他们有一个叫做'returnErrorCodes‘的函数。这将为您提供一个列表(csv或json),其中包含它们的所有错误代码及其含义。
https://stackoverflow.com/questions/40607400
复制相似问题