2011-01-29 95 views
2

我已經導入了一個WSDL(使用自動更新檢測...),現在當我嘗試使用它時,出現類似於「頂級節點缺失,Line:0」的錯誤,我已經花了很多小時在谷歌找到一個解決這個問題,我看到很多人都遇到同樣的問題,但我找不到它的修復。缺少SOAP頂級節點

我敢肯定你們很多開發者已經解決了這個問題,所以我的問題是如何?!

當進口它產生一個具有輔助方法和返回主界面,例如一個特殊功能的主接口的WSDL:

type 
    array_of_string = array of string; 
    ASpecialInterface = interface(IInvokable) 
    //... 
    function ASpecialMethod(const dummyArg: string): array_of_string; stdcall; 
    //... 
    end; 

和返回ASpecialInterface,示例的方法:

function GetASpecialInterface(const UseWSDL: Boolean; const addr: string; const ahttprio: THTTPRio): ASpecialInterface; 

這裏是我的問題:

procedure TMyForm.OnAButtonClick(Sender: Tobject); 
var 
    LArrayOfString: array_of_string; 
    LSpecialIntf: ASpecialInterface; 
begin 
    // this works without any issue whatsoever 
    LSpecialIntf := GetASpecialInterface; // I call it with default params 
    // the next code raises the exception mentioned above 
    LArrayOfString := LSpecialIntf.ASpecialMethod(EmptyStr); // no param passed since the dummyArg is dummy 
end; 

現在,我不知道這是寶貴的,但連接使用SSL製成,即https://domain.com/ ...

編輯:對不起,忘了提,我使用德爾福2010年

謝謝大家的時間。

+1

你使用什麼Delphi版本?在D2010中,當找不到服務器時會出現此錯誤。 https://forums.embarcadero.com/thread.jspa?threadID=44545&tstart=0 – 2011-01-29 16:08:16

回答