我使用 Php Nusoap 创建了一个简单的 Web 服务。它工作正常,但唯一缺少的是将默认 xmlns 属性添加到响应标记。
这是 Response 的副本:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<LoginResponse xmlns="">
<LoginResult>
<register>
<customer>d2ff3b88d34705e01d150c21fa7bde07</customer>
</register>
</LoginResult>
</LoginResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
如何将命名空间添加到 LoginResponse 标记。提前谢谢。