使用SOAP UI在PHP中使用SOAP服务器时出错,“Webservice处理程序类不存在”


Error when consuming SOAP Server in PHP with SOAP UI, "Webservice handler class not present"

我使用PHP -wsdl-creator编写了一个PHP SOAP服务器。我有一个问题,从这个服务器消费数据。我有一个doPing()函数,它接收一个字符串并返回一个"Hello".$thatString。当我从SOAP客户端执行此操作时,我得到以下错误:


(!)致命错误: Uncaught exception消息"Webservice处理程序类不存在"的异常C:'wamp'www'GDR'class.phpwsdl.php on line 1781(!)异常:Webservice处理程序类不存在C:'wamp'www'GDR'class.phpwsdl.php on line 1781呼叫'hello_server.php:0 20.0000798296require_once('C:'wamp'www'GDR'class.phpwsdl.php'). 'hello_server.php:3 30.00001172088PhpWsdl::PostInit() . . ' class.phpwsdl.php : 46 40.00001172336 phpwsdl:: RunQuickMode () . . ' class.phpwsdl.php : 2441 50.00001177448 phpwsdl -> RunServer () . . ' class.phpwsdl.php : 554

如果您需要更多关于服务器或客户端文件的信息,请询问-谢谢。

已解决

https://code.google.com/p/php-wsdl-creator/issues/detail?id=1

在class.phpwsdl.php文件的第434行中,如果将soap_version设置为其中一个版本(SOAP_1_1或SOAP_1_2,而不是SOAP_1_1 | SOAP_1_2),则错误将消失。

而且我还必须将方法设置为全局方法,因为我没有webservice处理程序类。

在用法中,它解释了怎么做

https://code.google.com/p/php-wsdl-creator/wiki/Usage