php - 如何将命名空间添加到 SOAP 响应?
问题描述
我的 SOAP 服务器返回以下响应:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://uws.provider.com/">
<SOAP-ENV:Body>
<ns1:PerformTransactionResult>
<status>201</status>
</ns1:PerformTransactionResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
但我需要以下结构:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns2:PerformTransactionResult xmlns:ns2="http://uws.provider.com/">
<status>0</status>
</ns2:PerformTransactionResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
解决方案
推荐阅读
- powershell - EPPlus 依赖循环
- oracle - 替换oracle中的字符(&)
- c - 安排代码以分离 C 中的函数
- ruby-on-rails - 添加对现有活动记录的引用并添加belongs_to,破坏代码
- git - git push 未在 github 上显示,仍然出现 lfs 错误
- c++ - 如何在 Visual Studio 2017 中为 Windows XP 编译代码
- azure-active-directory - 为 AAD 更改通知创建订阅会不一致地引发“订阅验证超时异常”
- sql - 使用所有参数选项时,如何让 SSRS 显示正确的平均工作时间?
- c - 如何在 C 中以二进制和文本模式使用 FILE
- ios - 快速,有没有办法从第二个领域包中添加新数据,而不覆盖当前默认领域中的任何现有数据?