使用 SOAP UI、"Webservice handler class not present" 在 PHP 中使用 SOAP 服务器时出错

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

我使用 php-wsdl-creator 编写了 PHP SOAP 服务器。我在使用来自该服务器的数据时遇到问题。我有一个 doPing() 函数,它接收一个字符串和 returns 一个 "Hello".$thatString。当我从 SOAP 客户端执行此操作时出现此错误:


( ! ) Fatal error: Uncaught exception 'Exception' with message 'Webservice handler class not present' in C:\wamp\www\GDR\class.phpwsdl.php on line 1781 ( ! ) Exception: Webservice handler class not present in C:\wamp\www\GDR\class.phpwsdl.php on line 1781 Call Stack #TimeMemoryFunctionLocation 10.0000257928{main}( )..\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.00001172336PhpWsdl::RunQuickMode( )..\class.phpwsdl.php:2441 50.00001177448PhpWsdl->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) 错误消失了。

而且我还必须将方法设置为全局方法,因为我没有网络服务处理程序 class。

此处在用法中向您说明了如何执行此操作

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