
[英]PHP - SOAP-ENV:ClientBad Request after SoapServer->Handle() - Help
[英]PHP SoapServer - Change SOAP-ENV to soapenv
我正在 php 中创建一个 SoapServer 端。 有人发出请求,服务器以 xml 响应。
我被要求将响应信封从 SOAP-ENV 更改为 soapenv。
这是它现在的样子:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://testing.bonusfarma.com.ar/api/serverSideSoap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
...
</SOAP-ENV:Envelope>
这是必须的:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://testing.bonusfarma.com.ar/api/serverSideSoap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
...
</soap:Envelope>
我一直在尝试更改 soap 版本,因为我读到它定义了信封,但它似乎不起作用。 更改应该只是一个参数:
$server = new SoapServer(null, array(
'location' => 'xxxxx'
'uri' => 'xxxxx'
'soap_version' => SOAP_1_2 // not working
)
);
对生成 SOAP-ENV 的原因以及我能做些什么来改变它有任何想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.