ROServiceGroupAttribute and rodl2code

Hi

in my server application in all services (code-first) I add the ROServiceGroup attribute to be able to manage them separately on the client side.

Currently in my service (but there will be many services developed with Hydra) there are two defined services:

1.login

  [ROService('LoginService', '{66980D47-CF19-40D3-B3D5-9B68B0279279}')]
  [RONamespace(__RODLLibraryNamespace)]
  [ROServiceGroup('login')]
  [ROStandardClassFactory]
  TLoginService = class(TSimpleLoginService, ILoginServiceServer)

2.common

  [ROService('CommonService', '{CCE18AD1-F304-49D4-80C8-2AC6B48190C6}')]
  [RONamespace(__RODLLibraryNamespace)]
  [ROServiceGroup('common')]
  [ROPooledClassFactoryAttribute(50)]
  TCommonService = class(TDataAbstractService)

I noticed that if I invoke from browser this link:

http://127.0.0.1:8099/rodl?servicegroup=login

the generated rodl is complete also with the common service

While if I throw this:

http://127.0.0.1:8099/bin?servicegroup=login

the generated rodl contains only the login service definitions.

Is this behavior correct?

I changed only /rodl? with /bin?

If I then try to generate the unit for the client with the use of rodl2code this does not work because the distributed Echoes.dll library is in version 10.0.02456 while the tool looks for the version 10.0.0.2480

This is the error that is raised:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly ‘Echoes, Version = 10.0.0.2480, Culture = neutral, PublicKeyToken = 3df3cad1b7aa5098’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have seen that this problem has already been resolved.

Is it possible to have the tool update?

Thank you very much

Hi,

I can’t reproduce this issue with simple testcase. probably this issue is reproduced only with hydra plugins…
can you create a simple testcase that reproduce it, pls?
you can attach it here or send directly to support@ for keeping privacy.

as a temporary workaround, you can use delphi based project (rocg4_helper.zip) from CodeFirst and Client-Side interfaces - Generates only one interface file topic

hmm. In this moment my server is compiled with runtime packages but not load any plugins. I tried to compile without runtime package but I have the same problem.

Could be code-first the problem?

I try to send you an example

Ok. I try with this tool

Best regards

Hi EvgenyK

i create a new sample ROSDK code-first service and I have the same problem.

Login service:

type
  [ROService(__ServiceName, __ServiceID)]
  [RONamespace(fServerDataModule.__RODLLibraryNamespace)]
  [ROServiceGroup('login')]
  [ROStandardClassFactory]
//  [ROZeroConfService(__ServiceName)]
  TLoginService = class(TRORemoteDataModule)

CodeFist service

  [ROService(__ServiceName, __ServiceID)]
  [RONamespace(fServerDataModule.__RODLLibraryNamespace)]
  [ROServiceGroup('codefirst')]
  [ROStandardClassFactory]
  // [ROZeroConfService(__ServiceName)]
  TCodeFirstSeverService = class(TRORemoteDataModule)

Open the browser I see all services despite having applied the filter:

When if I filter through the /bin? parameter it works properly

Here the sample source project:

RODemo3.7z (52.7 KB)

Hi,

I’ve tested with plain http server.
you have used superhttp server. this is a reason for this issue

1 Like

Thanks, logged as bugs://84770

1 Like

Ah ok!

then as a workaround I add a plain http connection to my server

Thank you very much

Hi,
pls update uROBaseSuperHttpServer.pas as

procedure TROBaseSuperHTTPServer.HandleRequest(aTarget: IROHTTPClientCapabilities;
  aRequestHeaders: TIPHTTPRequestHeaders; aRequest: TBytes);
...
            else if DoProcessDocs(lTransport,lResponseHeaders,lResponseStream,lroot,lSubPath) then begin  // 1st param is changed
1 Like

bugs://84770 got closed with status fixed.