Using Records with Delphi Web Services

I am trying to use records with a web services application in Delphi 32, records defined as

TMyRec = record
  Val1:integer;
  Val2:string;
end;

TMyClass = class(TRemotable)
  private fMyRec:TMyRec;
published
  property MyRec:TMyRec read fMyRec write fMyRec;
end;  

ITMyService = interface(IInvokable)
  ['{6283B8DA-C567-4814-906E-321729B1AE72}']

    function GetMyClass(id:Integer):TMyClass;stdcall;
  end;

but it doesn’t appear as in the WSDL file, so what is the problem when using records?

I am using Delphi 2009

+3
source share
2 answers

I tried the RemObjects SDK and it does the job.

Delphi cannot do simple things like writing inside a class for web services :-(, I think they need to work a lot to make a real tool for Delphi's business.

0
source

, - . docwiki


:

TMyRec = record
  Val1:integer;
  Val2:string;
end;

TMyClass = class(TRemotable)
  private fMyRec:TMyRec;
published
  property MyRecVal1:Integer read GetMyRecVal1 write SetMyRecVal1;
  property MyRecVal1:string read GetMyRecVal2 write SetMyRecVal2;
end;  

fMyRec, getter setter. , , , , .

+2

Source: https://habr.com/ru/post/1735782/


All Articles