Generated RODL code does not contain (all) classes when using remoteRODL with tcp server

AFAIK I have 3 ways to generate RO interface files for my tcp RO service.

  1. Using rodl2code from the original .rodl file
  2. Using the RAD Studio GUI plugin menu>…>'Connect to Remoting SDK Server and then specify
    something like tcp://localhost:7789/bin
  3. Using the rocg4_helper

When I use method 1 I get files with names
OffNetServerLibrary_Intf.pas, OffNetServerLibrary_ServerAccess.pas and OffNetServerLibrary_ServerAccess.dfm
This content is OK but the serveraccess file cannot be used because it specifies HTTP instead of TCP

When I use method 2 or 3 I get files with names
OffNetServer_Intf.pas, OffNetServer_ServerAccess.pas and OffNetServer_ServerAccess.dfm
but the content is not OK.
I am missing RO classes that are specified in the RODL
e.g. PayconiqPaymentRequest

Is there a fundamental difference between method 1 and 2?
I have just altered all my client code from 1 to 2 but the code doesn’t compile anymore due to the missing classes.

I have attached all relevant files.
What’s wrong? How can I fix things?
ro.7z (23.4 KB)

Hi,

  • OffNetServer_Intf.pas vs offnetserver_intf_roCommandlinetool.pas
    this is almost the same. difference via additional defines. it can be changed via compiler defines or manually via properties.
    property TargetNameSpace: string index 0 read GetAddParam write SetAddParam;
    property ServiceName: string index 1 read GetAddParam write SetAddParam;
    property CustomAncestor: string index 2 read GetAddParam write SetAddParam;
    property CustomUses: string index 3 read GetAddParam write SetAddParam;
    property ServerAddress: string index 4 read GetAddParam write SetAddParam;
    property AdditionalParams: string read GetAdditionalParams write SetAdditionalParams;
    property FullFramework: string index 5 read GetAddParam write SetAddParam;
    property AsyncSupport: string index 6 read GetAddParam write SetAddParam;
    property DelphiFullQualifiedNames: string index 7 read GetAddParam write SetAddParam;
    property DelphiScopedEnums: string index 8 read GetAddParam write SetAddParam;
    property DelphiLegacyStrings: string index 9 read GetAddParam write SetAddParam;
    property DelphiCodeFirstCompatible: string index 10 read GetAddParam write SetAddParam; // deprecated
    property DelphiGenerateGenericArray: string index 11 read GetAddParam write SetAddParam;// deprecated
    property DelphiAsyncCallback_as_reqular_method: string index 12 read GetAddParam write SetAddParam;
    property DelphiHydra: string index 13 read GetAddParam write SetAddParam;
    property RODLFileName: string index 14 read GetAddParam write SetAddParam;
    property DelphiXE2Mode: string index 15 read GetAddParam write SetAddParam;
    property DelphiFPCMode: string index 16 read GetAddParam write SetAddParam;
    property DelphiCodeFirstMode: string index 17 read GetAddParam write SetAddParam;
    property DelphiGenericArrayMode: string index 18 read GetAddParam write SetAddParam;
  • OffNetServer_Intf.pas vs OffNetServerLibrary_Intf.pas - different RODLs were used for generation of these files.
    different set of services are defined in each file:
const ICommonDBDataService_IID: TGUID = '{A139941A-04E8-4AD7-CCCA-1126ACB6C717}';
const IGenericDBService_IID: TGUID = '{58E0101F-21E6-AA5A-CC86-DC2728DA5CFB}';
const IOffConnectDataService_IID: TGUID = '{E6AA9D42-53FE-24DC-AB38-2EEFC05AB806}';
const IOffESLDataService_IID: TGUID = '{C9DC3293-EC71-BE90-BA8F-9683FEE3FFCA}';
const IOffNetDataAbstractService_IID: TGUID = '{487DC62A-EDCE-ED9A-7FA3-5C5A0C92EC3B}';
const IOffRecipeDataService_IID: TGUID = '{20810CD7-59A5-5E82-D87F-F98DB0CF7037}';
const IRapportenDataService_IID: TGUID = '{8A4EABA6-7D95-2349-D40C-5F0FC9D9EE5D}';
const ITarUploadDataService_IID: TGUID = '{83BC316B-49BA-CC35-DAE6-ABDF18865154}';

vs

const ICommonService_IID: TGUID = '{B6D5F6F0-79FB-4159-9FD3-75135A5D4400}';
const IFacturatieService_IID: TGUID = '{26C22A60-A0B2-4D4D-88F7-EEC3C32DE33B}';
const IMailService_IID: TGUID = '{42105C82-AB9D-4B7F-B35F-2FB8C993C8E5}';
const IPayconiqService_IID: TGUID = '{A2637E81-561F-43D1-9478-8D54E84A20A2}';
const ITarUploadService_IID: TGUID = '{3E50B7F3-A7B2-4158-B945-726AE35AC5BE}';

The difference in the RODL is the fact that 1 is the original RODL and 2 is the remoteRODL.
The main issue/question remains: Why am I missing classes with the remoteRODL technique

The exported (remote) RODL is also missing these (see attachment)
exportedoffnetremoterodl.rodl (24.9 KB)

Hi,

you are using different RODLs or different servers.

Compare:
untitled

one is DA based and has 8 services
second one isn’t DA based and has 5 services

OK, so the issue is that the tools that extract the RODL from a running service are extracting the DA based rodl? How can I tell them to take everything (or the non DA based RODL)

Hi,

one thing confuses me - Library GUID is persistent for RODL-based servers, but in your case, they are different:

compare

<Library Name="OffNetServer" Namespace="OffNetServer" UID="{D964B509-B4BB-6E4F-FF5E-ED612E33CAFB}" Version="3.0">

vs

<Library Name="OffNetServerLibrary" UID="{DA8D34C8-9606-405D-AE92-47902EC350D6}" Version="3.0">

so they were generated from different servers.

The server is C# .NET but the RODL it uses is not different.

I can confirm the .RODL file used by our .NET sources has

<?xml version="1.0" encoding="utf-8"?>
<Library Name="OffNetServerLibrary" UID="{DA8D34C8-9606-405D-AE92-47902EC350D6}" Version="3.0">
<Services>

in it.
The server gets copied to other directories (VCS branches) but does not change.
The output of our TROCodegen4.generate tool with input tcp://localhost:7789/bin
gives us

const LibraryUID: String = '{D964B509-B4BB-6E4F-FF5E-ED612E33CAFB}';

This is all v1521 (both .NET and delphi)

FYI it looks like my paste of some XML does not visualize correct on this website.
I pasted
lt ?xml version=“1.0” encoding=“utf-8”? gt
lt Library Name=“OffNetServerLibrary” UID="{DA8D34C8-9606-405D-AE92-47902EC350D6}" Version=“3.0” gt
lt Services gt

[when I edit the previous post it still shows this content]

Hi,

I think, I need some simple testcase from you.
it should use OffNetServer.RODL (with UID="{DA8D34C8-9606-405D-AE92-47902EC350D6}").

when I address to this server with rocg4_helper, it should generate RODL with UID="{D964B509-B4BB-6E4F-FF5E-ED612E33CAFB}" or other guid

For now I have rewritten my code so I don’t use the serveraccess files anymore and I haver reverted to using the uriginal RODL with the rodl2code tool.

I will make a sample the next time I run into the issue.

Note: Another issue with the serveraccess files is that serverURL is hardcoded and the serverURL property is made private so overriding the class is also not an option

Hi,

A _ServerAccess file is created for your client project when you Connect to a Server from the IDE.

It contains a small helper class that provides a convenient starting point for encapsulating the access to your server from within your client app. Once created, this file becomes “yours”, and you will most likely expand it (significantly) to expose functionality more specific to your concrete project.

The ServerAccess class is merely a suggestion and an assistance to get you started, you can feel free to simply remove the file from your project, or rewrite it vastly, if you want to structure your server access differently within the client app.