Delphi Win32从ASP.NET服务接收数据表

Hei*_*sis 6 delphi soap

我正在构建一个应该使用Soap服务的Delphi Win32应用程序,它最终成为一个基于.NET的应用程序.一个函数返回一个DataTable.当然,Delphi Win32(不是Delphi .NET)本身无法理解这一点.

我能用它做任何事吗?我也很乐意手动解析XML,但我不知道如何获取原始XML响应.

WSDL:https://stratus.voxamvia.co.za/api.asmx? WSDL

函数:GetNotifications返回GetNotificationsResult,它构建为:

  GetNotificationsResult = class(TRemotable)
  private
    Fnamespace: WideString;
    Fnamespace_Specified: boolean;
    FtableTypeName: WideString;
    FtableTypeName_Specified: boolean;
    procedure Setnamespace(Index: Integer; const AWideString: WideString);
    function  namespace_Specified(Index: Integer): boolean;
    procedure SettableTypeName(Index: Integer; const AWideString: WideString);
    function  tableTypeName_Specified(Index: Integer): boolean;
  published
    property namespace:     WideString  Index (IS_ATTR or IS_OPTN) read Fnamespace write Setnamespace stored namespace_Specified;
    property tableTypeName: WideString  Index (IS_ATTR or IS_OPTN) read FtableTypeName write SettableTypeName stored tableTypeName_Specified;
  end;
Run Code Online (Sandbox Code Playgroud)

任何帮助赞赏!

如果我实现RemObjects会有帮助吗?

RBA*_*RBA 3

您可以从 xml 构建数据集。这应该为您提供一个起点:http://www.gekko-software.nl/DotNet/Art07.htmhttp://www.gekko-software.nl/DotNet/Art08.htm

我没有使用过 RemObjects 中的 DataAbstract,所以我无法给出建议。

LE:您可以按照 drbob 写的这篇简单文章访问和使用用 .net 编写的 Web 服务 - Consuming C# Web Services with Delphi 7 Professional

其中还包含一个关于如何动态构建以及如何使用 THttpRio 的小示例(与 Mikael Eriksson 的答案相同)