AFAIK I have 3 ways to generate RO interface files for my tcp RO service.
Using rodl2code from the original .rodl file
Using the RAD Studio GUI plugin menu>…>'Connect to Remoting SDK Server and then specify
something like tcp://localhost:7789/bin
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)
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:
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
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)
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
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]
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
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.