問題描述
我正在嘗試在服務器端使用 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.
這篇關于如何擺脫“未捕獲的 SoapFault 異常:[客戶端] 看起來我們在...中沒有 XML 文檔"錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!