如何在SOAP响应中添加名称空间?

时间:2019-03-25 13:20:49

标签: php soapserver

我的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> 

0 个答案:

没有答案