Php 如何在Zend Soap服务器中更改响应函数名?

Php 如何在Zend Soap服务器中更改响应函数名?,php,soap,zend-framework,wsdl,Php,Soap,Zend Framework,Wsdl,我正在生成一个WSDL,我需要更改响应中的函数名以匹配来自客户机的名称(我无法控制) 下面是我得到的WSDL响应: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost:8000/soap/index.

我正在生成一个WSDL,我需要更改响应中的函数名以匹配来自客户机的名称(我无法控制)

下面是我得到的WSDL响应:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost:8000/soap/index.php?wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:fooFunctionResponse>
         <return xsi:type="xsd:boolean">true</return>
      </ns1:fooFunctionResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我在Zend framework(
Autodiscover.php
Line514)中找到了这行代码,它似乎控制了函数的命名:

$element = [
    'name'      => $functionName . 'Response',
    'sequence'  => $sequence
];
但是更改它根本没有任何作用,父方法永远不会被调用。我不知道如何解决这个问题,请帮忙

我发现这一行确实更改了函数名,但是我正在使用SoapUI测试我的API,在SoapUI中,我总是看到
Response
,而不是我更改字符串的任何内容。在Chrome中,我看到
确认


为什么SoapUI显示不同的函数名?

我不太了解Zend框架和/或它的结构。但是我认为您可以简单地扩展包含
response()
方法的类并覆盖该方法

// Example Zend Class
class Zend_Class {

    public function response()
    {
        // ...
    }
}

// Your own Class
class Own_Class extends Zend_Class
{
    public function ResponseBoohoo()
    {
        return parent::response();
    }
}

如果我完全误解了你,我道歉。:)

如果我确定正在调用包含
response()
的方法,我会这样做。据我所知,该方法没有被调用。我刚刚检查并看到该方法被调用,但SoapUI正在做一些奇怪的事情,请参见我的编辑。
// Example Zend Class
class Zend_Class {

    public function response()
    {
        // ...
    }
}

// Your own Class
class Own_Class extends Zend_Class
{
    public function ResponseBoohoo()
    {
        return parent::response();
    }
}