我在设置 SOAP 标头时遇到了两个问题。首先,我以前从未这样做过,两次,我似乎无法在这里找到一个好的解决方案。如果有完全相同的重复,我深表歉意,如果有,请指出正确的方向。
我需要在soap:Envelope 上设置以下xmlns:xsi 和xmlns:xsd 数据集。我还需要在 XML 中的第一个标签上设置一个 xmlns 属性(粗略示例)。
第一部分需要添加,当我执行 __getLastRequest() 时,第二部分已经存在。并且需要添加第三部分(只是 SendPurchases xmlns 属性)。
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
xmlns:ns1="urn:[taken out for security purposes]">
<soap:Body>
<SendPurchases xmlns="urn:...">
</SendPurchases>
</soap:Body>
我需要为此使用 header() 吗?我正在使用 PHP 的 SOAP 客户端。非常感谢任何帮助!
编辑:
我选择了另一条路线,不过还是感谢您的所有回答!