问题描述
当我去[URL] / API(其中的[url]是我的Magento的网址),我得到这样的答复:
When I go to [url]/api (where [url] is the url of my Magento), I get this response:
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSDL</faultcode>
<faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/magento/1.7/index.php/api/index/index/?wsdl=1' : Couldn't find end of Start Tag part line 56
</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
正确的反应应该是:
The correct response should be:
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>Sender</faultcode>
<faultstring>Invalid XML</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
怎么办?
推荐答案
我来晚了,但希望我的回答将是有益的人在未来。
I'm late but hope my reply will be useful for someone in future.
我有完全相同的问题。我已经安装了Zend服务器(PHP 5.3.9),并得到同样的错误。我搜索了很多,应用所有可用的解决方案,但未能....最后,我安装WAMP,然后运行SOAP客户端'脚本在那里,它成功运行。
I had exactly the same problem. I had installed Zend Server (PHP 5.3.9) and was getting the same error. I searched a lot and applied all available solutions but fails.... Finally, i installed wamp and then run 'Soap Client' script over there and it runs successfully.
然后我达成这一点上,Zend服务器(PHP 5.3.9)在SOAP客户端脚本一些默认的错误。我卸载了Zend服务器(PHP 5.3.9),并在那里安装了Zend服务器(PHP 5.4.11)并运行SOAP客户端脚本。这一次,它成功运行。
Then i reached on this point that Zend Server (PHP 5.3.9) has some default bug in 'Soap Client' Script. I uninstalled Zend Server (PHP 5.3.9) and installed Zend Server (PHP 5.4.11) and runs 'Soap Client' script over there. This time it runs successfully.
结论:请使用最新版本的PHP(Zend服务器)或(WAMP服务器)一样,有默认的SOAP客户端的错误在一些PHP版本,一个我在上面提到
Conclusion: Please use latest PHP version (Zend Server) or (Wamp Server) as, there is default 'Soap Client' bug in some PHP versions, one i mentioned above.
谢谢,Kashif
这篇关于Magento的API SOAP的错误:解析WSDL:无法从加载“[URL] /index.php/api/index/index/?wsdl=1”:找不到启动变量部分线路56尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!