SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://****/ReportService/WebService1.asmx' : Premature end of data in tag html line 3
暫時遇到了這條錯誤,
實際上是因爲
$url = 'http://*****/ReportService/WebService1.asmx'; $client = new \SoapClient($url, array("trace" => 1, "exception" => 0));
這裏的url是 帶no-wsdl的
在url結尾加 ?wsdl即可
$url = 'http://****/ReportService/WebService1.asmx?wsdl'; $client = new \SoapClient($url, array("trace" => 1, "exception" => 0));
但是我這個報錯也是個別情況,百度良久沒答案於是試出來了
之後貼出請求webservice的方法