# Rodl2code for tcp RO server

**URL:** https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500
**Category:** Remoting SDK
**Tags:** delphi
**Created:** [April 7, 2022, 2:27pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500 "2022-04-07T14:27:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [April 7, 2022, 2:27pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/1 "2022-04-07T14:27:32Z")

</div>

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](https://github.com/remobjects/codegen4))

```auto
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

```auto
<?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

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [April 7, 2022, 3:02pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/2 "2022-04-07T15:02:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [April 7, 2022, 3:04pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/3 "2022-04-07T15:04:55Z")

</div>

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](https://talk.remobjects.com/t/codegen-options/25696/2)  
this example supports all possible protocols: http(s) / tcp(s) / superhttp(s) / supertcp(s).

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [April 7, 2022, 3:37pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/4 "2022-04-07T15:37:50Z")

</div>

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;

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [April 7, 2022, 3:38pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/5 "2022-04-07T15:38:30Z")

</div>

![afbeelding](https://talk.remobjects.com/uploads/default/original/3X/a/b/ab50111244482e5a72dd5f87d28b301d53ae0d68.png)

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [April 7, 2022, 4:27pm UTC](https://talk.remobjects.com/t/rodl2code-for-tcp-ro-server/26500/6 "2022-04-07T16:27:21Z")

</div>

Hi,

this is already fixed.  
fix is included into .1537
