致命错误:未捕获的SoapFault异常:SOAP不支持[客户端] DTD

时间:2012-07-09 10:29:34

标签: php soap

我正在尝试使用soap示例运行php Web服务但是我收到此错误,我不知道这是什么意思?你能救我吗?感谢。

以下是完整错误:

  

致命错误:未捕获的SoapFault异常:[C:\ Program Files(x86)\ EasyPHP-5.3.9 \ www \ istemci.php中的SOAP不支持[客户端] DTD:3
  堆栈跟踪:
  #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}
  在第3行的C:\ Program Files(x86)\ EasyPHP-5.3.9 \ www \ istemci.php中抛出

这是我的server.php代码:

  <?php 
  $istemci=new SoapClient(null,array ('uri'=>'http://ersindogan-testuri','location'=>'http://localhost/test/sunucu.php'));
  var_dump ($istemci->gonder('mesaj','konu','kime'));
  ?>

这是client.php代码:

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

1 个答案:

答案 0 :(得分:2)

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

请进行问题排查并回复。