#1 2013-10-18 10:40:15

DigDiver
Member
Registered: 2013-04-29
Posts: 137

Server Method does not work with the latest leaf

  TWPManagerServer = class(TSQLRestServerDB)
   private
   protected
   public
    published procedure GetLicenceInfo(var Ctxt: TSQLRestServerURIContext);
...

The AV occurs in procedure TSQLRestServerURIContext.Returns(

procedure TSQLRestServerURIContext.Returns(const Result: RawUTF8;
  Status: integer; const CustomHeader: RawUTF8; Handle304NotModified: boolean);
var clientHash, serverHash: RawUTF8;
begin
  if Status in [HTML_SUCCESS,HTML_CREATED] then begin
    Call.OutStatus := Status;  <- Access violation here
    Call.OutBody := Result;

Offline

#2 2013-10-18 12:35:33

DigDiver
Member
Registered: 2013-04-29
Posts: 137

Re: Server Method does not work with the latest leaf

I found the problem:

Method should be declared:

published procedure GetLicenceInfo(Ctxt: TSQLRestServerURIContext);

Because changed type TSQLRestServerCallBack;

 TSQLRestServerCallBack = procedure(Ctxt: TSQLRestServerURIContext) of object;

Offline

#3 2013-10-18 19:40:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Server Method does not work with the latest leaf

Yes the signature changed, as notified on this forum and the blog.
http://synopse.info/forum/viewtopic.php?pid=8674#p8674

Now it is much more powefulll, expandable and easy to maintain.

Offline

Board footer

Powered by FluxBB