Php – Fatal error: Uncaught SoapFault exception: [Client] DTD are not supported by SOAP

PHPsoap

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();

Best Answer

1. Check the End point URL, make sure its the right one

2. Check the SOAP header formation. Make sure you have required information, with encoding too .
3. SOAP parameters might be case sensitive

Please troubleshoot and reply.

Related Topic