Right, I’ve changed. But think of the following scenario: I have a server application that loads 10 services, ie the rodl2code will generate 10 separate interfaces, I’ll pass the command line 10 times changing only the parameter (url with the servicegroup" ) how will it change the interface names as the servicegroup informed? if the set RODLLibraryName of gets .exe it will only have one service name,
why you can put each generated _intf into personal folders, like
for each dll I have several services and the services use each other’s services, I can not have interfaces (_intf) with the same name, besides, on the client side, uses the services of several dlls (ie transparent to the client side ), for example, uses LOGIN_INTF, DEPART_INTF, LOCATION_INTF these services can be in any dll.
I understood your idea.
what I can suggest:
- get RODLLibrary from http://localhost:8099/rodl?servicegroup=XXXXXX with
(MyChannel as IROMetadataReader).RetrieveRODL(...)
Library.Namein generated RODL with new name
- pass given RODLLibrary into
gen:= TROCodegen4.Create; try rec := gen.Generate(aLibrary, cg4l_Delphi, cg4m_Intf);
- receive generated _Intf file from
I can’t make this change. Please, can you help me?
you can use this sample: rocg4_helper.zip (53.2 KB)
I’m getting this error when trying (ROWinInetHTTPChannel1 as IROMetadataReader).RetrieveRODL(rodl);
Exception class EROException with message ‘Cannot load XML document.
Reason: Caractere inválido encontrado no texto.
what URL is set in ROWinInetHTTPChannel? http://localhost:8099/rodl?servicegroup=XXXX ?
This sounds like you’re not getting back a valid XML file from whatever URL you’re using?
if you open this link in browser - RODL will be shown correctly?
Do you use my
rocg4_helper.zip from this post?
Yes, in the browser it shows correctly
Yes, I’m using a rocg4_helper.zip sample project.
can you set breakpoint in
TROTransportChannel.RetrieveRODL (uROTransportChannel.pas) at
XmltoRodl := TXMLToRODL.Create(nil); line and evaluate content of
resp in debugger?
this is Binary so you can see content with something like
the result of PAnsiChar(Binary(resp).Memory) is ‘RO107’
weird, this is signature of TROBinMessage
Edit. can you launch your server in debug mode and set breakpoint at
MainProcessMessage method (uROServer.pas) at
case aRequestStream.Size of line? at requesting RODL in rocg4_helper it should select
Is ServeRodl turned off, maybe?
I did upgrade to RO 184.108.40.2061 but did not have the changes logged as bugs://81715 and
I have not yet been able to update my project for a new version of RO.
Please, I need these changes to continue trying to solve my problem.
pls read https://talk.remobjects.com/t/remoting-sdk-for-delphi-vnext-new-features/18354 , it contains description of this feature
Following the steps as the text (https://talk.remobjects.com/t/remoting-sdk-for-delphi-vnext-new-features/18354) worked when filtering by the service name in the browser, but isn’t working on the command line using Rodl2code to generate the interfaces.
The following error occurs:
C:\Program Files (x86)\RemObjects Software\RemObjects SDK (Common)\Bin>rodl2code http://localhost:8099/rodl?servicegroup=BINDER --type:intf --platform:delphi --language:delphi outpath:“c:\temp” --namespace:BINDER --codefirst-compatible
Remoting SDK Service Interface Code Generator, based on CodeGen4 (https://github.com/remobjects/codegen4)
Processing RODL file http://localhost:8099/rodl?servicegroup=BINDER
There was a problem loading the RODL.
System.Exception: unknown type: DataParameter
em RemObjects.SDK.CodeGen4.DelphiRodlCodeGen.Intf_generateReadStatement(RodlLibrary library, String aElementType, CGExpression aSerializer, CGCallParameter aName, CGCallParameter aValue, CGTypeReference aDataType, CGCallParameter aIndex)
em RemObjects.SDK.CodeGen4.DelphiRodlCodeGen.Intf_GenerateArray(CGCodeUnit file, RodlLibrary library, RodlArray entity)
em RemObjects.SDK.CodeGen4.DelphiRodlCodeGen.GenerateInterfaceCodeUnit(RodlLibrary library, String aTargetNamespace, String aUnitName)
em RemObjects.SDK.CodeGen4.RodlCodeGen.GenerateInterfaceFile(RodlLibrary library, String aTargetNamespace, String aUnitName)
Can you send your RODL (if you are using RODL-based server) or simple testcase (if CodeFirst-based server is used) to support@ for investigation, pls?