I am trying to work a php web service with soap example however i get this error and i don't know what does that mean? Could you help me out? Thanks.
Here is the full error:
Fatal error: Uncaught SoapFault exception: [Client] DTD are not supported by SOAP in C:\Program Files (x86)\EasyPHP-5.3.9\www\istemci.php:3
Stack trace:
#0 C:\Program Files (x86)\EasyPHP-5.3.9\www\istemci.php(3): SoapClient->__call('gonder', Array)
#1 C:\Program Files (x86)\EasyPHP-5.3.9\www\istemci.php(3): SoapClient->gonder('mesaj', 'konu', 'kime')
#2 {main}
thrown in C:\Program Files (x86)\EasyPHP-5.3.9\www\istemci.php on line 3
Here is my server.php code:
<?php
$istemci=new SoapClient(null,array ('uri'=>'http://ersindogan-testuri','location'=>'http://localhost/test/sunucu.php'));
var_dump ($istemci->gonder('mesaj','konu','kime'));
?>
Here is client.php code:
<?php
class SMS {
public function gonder($mesaj,$konu,$kime){
return 'mesaj gonderildi';
}
}
$sunucu=new SoapServer(null,array ('uri'=>'http://ersindogan-testuri'));
$sunucu->setClass('SMS');
$sunucu->handle();
try{} catch()
contsruction to catchSoapFault
exception and thenvar_dump();
it. You will find mpre info onfaultstring
index of output array. – s.webbandit