Rodl2code for tcp RO server

Should we be able to generate itf and serveraccess files with rodl2code using a remoteRODL with a tcp:// URL?

We get the error below
“C:\Program Files (x86)\RemObjects Software\RemObjects SDK (Common)\Bin”\rodl2code OffNetServerTcp.remoteRODL --language:delphi --type:intf --outfilename:OffNetServer_Intf.pas
Remoting SDK Service Interface Code Generator, based on CodeGen4 (GitHub - remobjects/CodeGen4: A Swift library tom generate source code for many languages)

Processing RODL file OffNetServerTcp.remoteRODL
There was a problem loading the RODL.

System.Exception: Unsupported URL Scheme (tcp) in remoteRODL.
   at RemObjects.SDK.CodeGen4.RodlLibrary.LoadFromUrl(String aUrl)
   at RemObjects.SDK.CodeGen4.RodlLibrary.LoadFromFile(String aFilename)
   at RemObjects.SDK.CodeGen4.RodlLibrary..ctor(String aFilename)
   at RemObjects.SDK.CodeGen4.__Global.Main(String[] __args)

For file

<?xml version="1.0" encoding="UTF-8"?>
<RemoteRodl>
	<Server>
		<Name>OffNetServer</Name>
		<ServerUri>tcp://localhost:7789/bin</ServerUri>
	</Server>
</RemoteRodl>

The GUI plugin seems to do a better job

This is with v1521

Note: We also tried generating the delphi sources using the original RODL but this also fails since he generates HTTP channel objects and I don’ see a way to switch to TCP

Hi,

rodl2code supports only http(s):// urls.

if you want, you can create Delphi utility that uses uROCodegen4Helper.pas unit.
see example at CodeGen options - #2 by EvgenyK
this example supports all possible protocols: http(s) / tcp(s) / superhttp(s) / supertcp(s).

Okay, I will try this. Meanwhile whenever we generate the code via the GUI the generated pas files cannot compile. There is a reference to a unit which is not included.
Why is this? Can this be fixed?

Example:
function DefaultNamespaces: String;
var
lres: String;
begin
lres := DefaultNamespace;
lres := (lres + ‘;’) + DataAbstract_Intf.DefaultNamespace;
lres := (lres + ‘;’) + DataAbstract_Simple_Intf.DefaultNamespace;
result := lres;
exit;
end;

afbeelding

Hi,

this is already fixed.
fix is included into .1537