JavaScript code generation with Service builder not working correctly?

Hi,

I am attaching the RODL file I am using with the Service Builder v10.0.0.1450 to generate the JavaScript interface from:

ChronicleRODA.rodl (244.2 KB)

I am attaching the Interface file I generated:

Chronicle_DataAccess_Remote2_intf.zip (25.9 KB)

When I attempt the use the file (replacing the previously generated file) I get the error:

Chronicle_DataAccess_Remote2_intf.js:3533 Uncaught TypeError: __namespace.DataAbstractService is not a constructor

Just loading the Chronicle_DataAccess_Remote2_intf.js in my project in Chrome does this:

Not sure why this is not working.

Thanks,
Todd

Thanks, logged as bugs://83445

Hello

Please take this file: Chronicle_DataAccess_Remote2_intf.zip (25.4 KB)

Generator will be adjusted to properly handle referenced RODL in the case when these RODL use their own namespace.

Sorry for the inconvenience

bugs://83445 got closed with status fixed.

Hi,

That fixed the the original error but now I have a new one:

index.html:69 Uncaught ReferenceError: ChronicleKeyValueStrings is not defined
at loadAll (index.html:69)
at HTMLButtonElement.onclick (index.html:34)

This is using the new file you posted. The reference appears to be in the file:

Thanks,
Todd

Hi,

  • backup ROSBJSCodegen.dll from C:\Program Files (x86)\RemObjects Software\RemObjects SDK (Common)\Bin
  • replace it with ROSBJSCodegen.zip (102.7 KB)
  • you may need to regenerate DataAbstract4_intf.js from DAD\DataAbstract4.RODL or DAN\DataAbstract.RODL. (this is the same file)
  • regenerate Chronicle_DataAccess_Remote2_intf.js

Note: tested with 10.0.0.1452, but may work with 10.0.0.1450 too

after this you can specify namespace like

cvs = new __Chronicle_DataAccess_Remote2namespace.ChronicleKeyValueStrings();

Please confirm that this structure [Library Name]namespace.ChronicleKeyValueStrings(); is how all our custom calls will need to be prefaced. I only want to do this once.

Additionally, when will this be in production?

each unit will contain a reference to it’s own namespace (created based on the RODL-set namespace) that is stored in this, like

var __RemObjects_DataAbstract_Servernamespace = this;
var __Chronicle_DataAccess_Remote2namespace = this;

it’s conveniently because you can use codelike

__namespace.DataService.prototype = new __RemObjects_DataAbstract_Servernamespace.DataAbstractService();
__namespace.LoginService.prototype = new __RemObjects_DataAbstract_Servernamespace.SimpleLoginService();
var cvs = new __Chronicle_DataAccess_Remote2namespace.ChronicleKeyValueStrings;

w/o any problems.

It’s already in main trunk. it will be publically at this or next Wednesday.