Nusoap - 修复响应的空xmlns属性

时间:2010-07-19 23:14:37

标签: php web-services soap nusoap

我使用Php Nusoap创建了一个简单的Web服务。它的工作正常,但唯一缺少的是将默认的xmlns属性添加到响应标记。

以下是回复的副本:

<?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标记中。提前完成。

1 个答案:

答案 0 :(得分:0)

将它添加到register()是否有效?

  $server->register(
     $methodname,
     $inputparameters,
     $outputparameters,
     $namespace,//<================    
     $soapaction,
     $style,
     $use
  );
相关问题