如何摆脱“未捕获的 SoapFault 异常:[客户端] 看起来我们在...中没有 XML 文档"错误
我正在尝试在服务器端使用 nusoap 为动态站点开发业务逻辑(因为我需要 wsdls,而 PHP SOAP 扩展无法生成 wsdls),并在客户端使用 PHP SOAP 扩展.
I'm trying to develop business logic for a dynamic site using nusoap on server side (because I need wsdls, and PHP SOAP extension can't generate wsdls), and PHP SOAP extenstion on client side.
但是,我什至无法正确使用 login 和 getRole 函数.当我尝试调用客户端时,我收到以下消息
However, I can't get even login and getRole functions right. When i try to invoke client, I get following message
Uncaught SoapFault exception: [Client] looks like we got no XML document in [some paths]...
Wsdl 确实存在于服务器端,并且客户端确实读取了它(当我为 wsdl 输入错误的 url 时,我收到错误消息).
Wsdl does exist on server side, and client does read it (when I put wrong url for wsdl, I get an error).
有人可以帮忙吗??
推荐答案
看起来您的客户端收到了一些无效的 XML - WSDL 本身或服务器返回的响应.尝试在 trace
选项设置为 TRUE 的情况下调用客户端,并检查通过 __getLastRequest()
和 __getLastResponse()
方法.
It looks like your client receives some invalid XML - either the WSDL itself or the response returned by the server. Try to invoke the client with the trace
option set to TRUE and check the actual XML send/received via the __getLastRequest()
and __getLastResponse()
methods.
相关文章