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年
谢谢大家的时间。
你使用什么Delphi版本?在D2010中,当找不到服务器时会出现此错误。 https://forums.embarcadero.com/thread.jspa?threadID=44545&tstart=0 – 2011-01-29 16:08:16