I wrote very simple code to retrieve soap data:
$wsdl = 'https://...';
$client = new SoapClient($wsdl, ['trace' => true]);
$soap_parameters = [
'leveranciernaam' => 'xxx',
'leveranciersleutel' => 'yyy',
'brinnummer' => 'zzzz',
'schooljaar' => 2012
];
$response = $client->getLeerlingen($soap_parameters);
To my huge surprise, the return was different from the return i received while using a Java based GUI application. Some fields in PHP SoapClient's response were consistently missing.
Just to make sure that things were not lost in translation to stdObjects, I used trace
option to and extracted actual XMl from $client->__getLastResponse();
Still those fields were not there - very consistently over hundreds of records.
Windows Java based client's response:
<return>
<leerlingen>
<leerling>
<id>353226866</id>
<roepnaam>Evline</roepnaam>
...
<achternaam>Staalstra</achternaam>
<inschrijvingen>
<inschrijving>
<id>353226867</id>
<datumInschrijving>2007-08-20T00:00:00+02:00</datumInschrijving>
<schoolVanHerkomst>7138</schoolVanHerkomst>
<vervolgSchool>7138</vervolgSchool>
<onderwijsSoortBestemming>
<id>4085</id>
</onderwijsSoortBestemming>
</inschrijving>
</inschrijvingen>
</leerling>
...
</leerlingen>
<brins>
<brin>
<id>47187537</id>
<brinNummer>02YN02</brinNummer>
<schoolNaam>De Ambelt School V LZK</schoolNaam>
</brin>
...
</brins>
</return>
Response i get:
<return>
<leerlingen>
<leerling>
<id>353226866</id>
<roepnaam>Evline</roepnaam>
...
<achternaam>Staalstra</achternaam>
<inschrijvingen>
<inschrijving>
<id>353226867</id>
<datumInschrijving>2007-08-20T00:00:00+02:00</datumInschrijving>
<inschrijvingType>1766564</inschrijvingType>
</inschrijving>
</inschrijvingen>
</leerling>
...
</leerlingen>
</return>
PHP client does not get (or does not properly parse) any elements schoolVanHerkomst
, vervolgSchool
and onderwijsSoortBestemming
in element inschrijving
and it misses brins
completely.
For brevity, I omitted other deeply nested elements that work just fine
Because expected results are dynamic, WDSL ( https://acceptatie.parnassys.net/bao/services/cxf/v1/generic?wsdl ) does not define ouput.
What is going on? It seems that PHP Soap client is less reliable than Java Soap clients