Runtime error when using a self defined code first service

unit TestService_Impl;

interface

uses
  System.SysUtils, System.Classes, System.TypInfo,
  uRORTTIAttributes, uROEncoding, uROXMLIntf, uROClientIntf, uROClasses,
  uROTypes, uROServer, uROServerIntf, uROSessions, uRORemoteDataModule, uROArray,
  fServerDataModule;

const
  __ServiceName = 'TestService';
  __ServiceID = '{B4662341-F519-4E47-9A9C-BF2F913964A0}';

type
  [ROService(__ServiceName, __ServiceID)]
  [RONamespace(fServerDataModule.__RODLLibraryNamespace)]
  [ROStandardClassFactory]
  TTestService = class(TRORemoteDataModule)
  private
    { Private declarations }
  public
    { Public declarations }

    [ROServiceMethod]
    function GetCurrency: Currency;
  end;

var
  TestService: TTestService;

implementation

{%CLASSGROUP 'Vcl.Controls.TControl'}

{$R *.dfm}

{ TTestService }

function TTestService.GetCurrency: Currency;
begin
  result := 324.123
end;

initialization
  RegisterCodeFirstService(TTestService);

end.

The code above build fine and runs until I try to actually call GetCurrency. Then it produces the following error in the debugger:

First chance exception at $752635D2. Exception class EResNotFound with message 'Resource TTestService not found'. Process ROCodeFirstServer.exe (12268)

What am I missing for proper setup of a code first service?

Hi,

I can’t reproduce any issue with it - everything works as expected: 21121.zip (219.9 KB)

You’re right. I had a messed up TestService_Impl.dfm that was causing the trouble.