【发布时间】:2017-07-11 08:55:16
【问题描述】:
我需要在 Soap 响应中添加一个命名空间。我正在使用 php 和 SoapServer。我的回复是这样开始的:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:query:request:v2.0">
我需要这样开始:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:query:request:v2.0" xmlns:ns2="urn:query:type:v2.0">
我在PHP中的代码是这样的,我不知道如何继续:
class Service
{
// FUNCTIONS
}
$options= array('uri'=>'urn:query:request:v2.0',
'cache_wsdl' => WSDL_CACHE_NONE);
$server=new SoapServer("Service.wsdl",$options);
$server->setClass('Service');
$server->addFunction(SOAP_FUNCTIONS_ALL);
$server->handle();
谢谢
【问题讨论】:
标签: php namespaces soapserver