我需要能够限制通过服务器端的nuSOAP的send_response()方法发送的内容。
当$ server-> service($ HTTP_RAW_POST_DATA)它自动调用私有方法send_response()
https://sourcecodebrowser.com/nusoap/0.7.3/class_8soap__server_8php_source.html(见第236-282行)
我需要在服务器级禁止此标头..非常感谢任何帮助。这是我的代码
$server = new soap_server ();
$server->configureWSDL ( "wsprocessor", "urn:wsprocessor" );
$server->register ( "getRequestReturnResponse", array (
"$inputXml" => "xsd:string"
), array (
"return" => "xsd:string"
), "urn:wsprocessor", "urn:wsprocessor#getRequestReturnResponse", "rpc", "encoded", "Get Response back from server as XML String" );
$server->service ( $HTTP_RAW_POST_DATA );
答案 0 :(得分:1)
好的..这个查询的答案是一个小小的黑客..之后
$server->service ( $HTTP_RAW_POST_DATA );
//Call the following
header_remove('X-SOAP-Server');
header_remove('X-SOAP-Server:');
header_remove('X-Powered-By');
header_remove('X-Powered-By:');
无论需要删除哪个标题..说出来