Using a ServiceContract in a Web Core application

Hello,


In the video https://www.youtube.com/watch?v=2SCvzw0L27o&t=518s 
from time 22:50 onward, Dr. Holger Flick show how a windows VCL client using a service from a XDataServer via an interface.

The definition of my interface:

type
  [ServiceContract]
  IStockDepartmentsService = interface(IInvokable)
    ['{C9F5D3DE-2DD3-43BB-ACDE-3CA496804E8E}']

    [HttpGet]
    function GetStockDepartments: TStream;
  end;


How do one achieve the the same results in a Web Core Application?

Regards,

Nols Smit


Nols,


this is explained in detail in the documentation. Wagner dedicated a whole chapter (pages 163 plus) to it. There are also multiple videos. Further, without ad intent, my book explains it in detail as well.

The short answer is that the PAS2JS compiler does not support Generics, so you cannot use that interface in a TMS WEB Core application. 




not "yet"

Agreed. :slight_smile: