你是要调用别人的 webservice接口,还是你自己要写webservice接口?前段我刚写过。把你的需求写下来。require_once("../class/nusoap.php"); 这个nusoap.php 最好放到你的包含路径中去。还有,webservice 你应该写个wsdl,

解决方案 »

  1.   

    没有啊,我测试是正常的。输出:程序返回 :Hello World!
      

  2.   

    require_once("../class/nusoap.php");
    如果你的有错误,那么应该是这个包含路径吧?还有
    $client = new soapclient('http://127.0.0.1:1234/php/test/nusoap_server.php'); 
    你直接进入 http://127.0.0.1:1234/php/test/nusoap_server.php 是否有xml输出?如果没有,那就是你这个错误。应该会有如下xml<?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/" xmlns:si="http://soapinterop.org/xsd">
    - <SOAP-ENV:Body>
    - <SOAP-ENV:Fault>
      <faultcode>Server</faultcode> 
      <faultactor /> 
      <faultstring>error in msg parsing: xml was empty, didn't parse!</faultstring> 
    - <detail>
      <soapVal xsi:type="xsd:string" /> 
      </detail>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>