Call a "Service Method" from a DataAbstractService

Hello,
I am trying to call a “Service Method” that is stored in a DataAbstractService class.
image
The _intf file is also created correctly and the call can be included.
image
Everything works but when I try to implement functions or even prodedures in the data module I get an exception on client access violation.

What am I doing wrong… or do I have a thinking error

Hi,

Can you create a simple testcase that reproduces this issue, pls?
you can attach it here or drop email to support@ for keeping privacy.

btw, how did you create CodeFirst version of DataAbstractService - manually or via conversion wizard?

with the conversion wizard…

Ok,
anbei ein Demo mit der gleichen vorgehensweise wie in meiner Applikation.
Erstellt mit Wizzard dann in Code First convertiert.

DemoApp.zip (67.3 KB)

Sorry Text in English

Ok,
Here is a demo with the same procedure as in my application.
Created with Wizerd then converted to Code First

Hi,

You have used the same GUID for both services:

  [ROService('DataService', '{7C8217D5-B91C-40CA-AF70-7218427B34D0}')]
  [RONamespace('DemoApp')]
  TDataService = class(TDataAbstractService)
  [ROService('DemoService', '{7C8217D5-B91C-40CA-AF70-7218427B34D0}')]
  [RONamespace('DemoApp')]
  TDemoService = class(TDataAbstractService)

as a result, it returns IDataService instance instead of IDemoService and it causes this issue.

workaround:

  • change guid (or even remove it as):
  [ROService('DemoService')]
  • regenerate Interface files from .remoteRODL
  • retest

Oops … sorry in stupid careless mistake … thanks for your help …