有点卷曲,我搞不懂(我没怎么用过SOAP )。
我有一个需要使用的WDSL服务:https://gist.github.com/aleayr/0dc4f26b0b9dd6ba7dae
但是PHP在尝试使用它时抛出一个致命错误,如下所示
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://path/to/ServiceManager.svc?wsdl' in C:\path\to\submit.php on line 37
我注意到实际的XML标记前面有一个wdsl命名空间,有什么方法可以让PHP识别这一点吗?
发布于 2015-09-10 04:23:28
我也犯了同样的错误。这一定是因为没有Action-URI的定义。我的计算是这样的:
public function testSOAPService()
{
$soap_action = "http://tempuri.org/XXXsomething/ActualURI";
$service = new SoapClient($this->wsdl); //WSDL defined before
$service->__setLocation($soap_action);
return $service->__getFunctions(); //you must see the functions of that service
}至少对我来说,这一切都很好。源SoapClient::__setLocation
https://stackoverflow.com/questions/25398193
复制相似问题