Php 致命错误:未捕获的SoapFault异常:[客户端]SOAP不支持DTD
我正在尝试使用soap示例使用PHPWeb服务,但是我得到了这个错误,我不知道这意味着什么?你能帮我吗?谢谢 以下是全部错误: 致命错误:未捕获的SoapFault异常:[客户端]C:\Program Files(x86)\EasyHP-5.3.9\www\istemci.php:3中的SOAP不支持DTD 堆栈跟踪:Php 致命错误:未捕获的SoapFault异常:[客户端]SOAP不支持DTD,php,soap,Php,Soap,我正在尝试使用soap示例使用PHPWeb服务,但是我得到了这个错误,我不知道这意味着什么?你能帮我吗?谢谢 以下是全部错误: 致命错误:未捕获的SoapFault异常:[客户端]C:\Program Files(x86)\EasyHP-5.3.9\www\istemci.php:3中的SOAP不支持DTD 堆栈跟踪: #0 C:\ProgramFiles(x86)\EasyPHP-5.3.9\www\istemci.php(3):SoapClient->\uu调用('gonder',数组) #
#0 C:\ProgramFiles(x86)\EasyPHP-5.3.9\www\istemci.php(3):SoapClient->\uu调用('gonder',数组)
#1 C:\Program Files(x86)\EasyHP-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'));
?>
<?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();
下面是client.php代码:
<?php
$istemci=new SoapClient(null,array ('uri'=>'http://ersindogan-testuri','location'=>'http://localhost/test/sunucu.php'));
var_dump ($istemci->gonder('mesaj','konu','kime'));
?>
<?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();
请排除故障并回复。尝试传递单个参数,而不是使用数组尝试{}catch()
继续捕获SoapFault
异常,然后var_dump()代码>它。您将在输出数组的faultstring
索引上找到mpre信息。我添加了代码。请你再看一遍好吗?谢谢。你能看看我刚才加在那里的代码吗?