Alexey,

thanks for that directory name, really useful

If I close cache down, can I then safely delete the contents and allow them to auto re-build when I next import the package.xml ? I'm assuming if I did this, it would force the xml file contents to be recognised 100% correctly

Sean.

thanks for the quick update,

technology wise, Cache, QEWDjs, restAPI's using standard JSON, JWT's - there will be about 100-150 api's and I'm trying to get the right concept correct before I rattle off the main bulk of them.

As long as I declare the JSON format, the third party will work with it.

I actual downloaded Cogs last night having followed your earlier thread about Cogs, and then imported JsonClass1.0.4.xml but it generated errors (I've just re-compiled it so I could get the error messages)
Compilation started on 03/16/2018 10:50:10 with qualifiers 'ckbry-u'
ERROR #5373: Class 'Cogs.Bookshelf.Page', used by 'Cogs.Lib.Json.Docs.JsonBenchmarks:superclass', does not exist
Skip class Cogs.Lib.Json.Docs.JsonBenchmarks
ERROR #5373: Class 'Cogs.Bookshelf.Page', used by 'Cogs.Lib.Json.Docs.Jsonclass:superclass', does not exist
Skip class Cogs.Lib.Json.Docs.Jsonclass
ERROR #5373: Class 'Cogs.Bookshelf.Page', used by 'Cogs.Lib.Json.Docs.Readme:superclass', does not exist
Skip class Cogs.Lib.Json.Docs.Readme
ERROR #5373: Class 'Cogs.Touchstone.TestSuite', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassSuite:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassSuite
ERROR #5373: Class 'Cogs.Touchstone.TestClass', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassTest1:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassTest1
ERROR #5373: Class 'Cogs.Touchstone.TestClass', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassTest2:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassTest2
ERROR #5373: Class 'Cogs.Touchstone.TestClass', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassTest3:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassTest3
ERROR #5373: Class 'Cogs.Touchstone.TestClass', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassTest4:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassTest4
ERROR #5373: Class 'Cogs.Touchstone.TestClass', used by 'Cogs.Lib.Json.Tests.JsonClass.JsonClassTest5:superclass', does not exist
Skip class Cogs.Lib.Json.Tests.JsonClass.JsonClassTest5

  • are you missing a couple of classes in the project.
  • how do I view the doc's  ?

having been very impressed with the small 90-100 lines of code to make it.

I'm actually interfacing to a third party and busy creating the actual API's (both in and out of the server)

I followed the way you did the SQL names etc, just couldn't see the syntax of the  calls to Cogs to create and interpret the JSON strings,

I'm after smallish ( 10kb) JSON strings for the memo/email side so, your current limitations is more than enough.

kevin

I agree totally with Robert, I much prefer the separation of routines and data but  I like the ability to simply replace cache.dat assumes nothing else is going on.

for me, one downside of replacing cache.dat for the routines is that you have to stop the cache instance to allow the replacement at file level,

I also dislike the compile options. I had a problem where (my mistake), I compiled the main class assuming dependant classes would also be compiled. That was a mistake, none of the dependant classes knew of my change.

that problem was solved by adding extra letters to the compiler in particular, I was told to add "bry" to the compile options. Not had a problem since, but if Intersystems knows this, then why not make that the default ? (I also had to add those letters to the default of all users that could issue the compile command - a real pain)

thanks Paul, 

it's got to be something like that,

for now, there's too many things in that directory that's messed up, and I need to press on.

I've taken the opportunity (temporarily ?) to move the API to a different structure by simply taking the xml, renaming all occurances, and uploading and now I have 

api.jitPod.toServer

api.jitPod.fromServer

its not a solutiion I like, but it allows me to get on with coding.

I'd still love to know if there is such a directory please because I can then keep all the "jitPod" files in one total directory structure.

kev

Step 5 has NOT been missed,

I've tried it BOTH ways, following all the steps and at step 5 changing everything to "api" (lowercase) before continuing to import, then when that didn't work, I tried following all the steps again, this time changing it to "Api" within the exported xml before importing  the file in steps 6 onwards,

either way, after following all steps to the letter,  for some reason, the xml importer does not seem to respect the uppercase/lowercase mix of the word "Api" - some get converted without any change at all, others will change the case of the "api" word - can't spot the common cause is

kevin

Thanks john.

I guess I'm using a package called "jitPod.Api.toServer" it could be construed as "directory" because the directory structure gets created upon the save. Its part of the className

the full classname would be jitPod.Api.toServer.logon

either way, I've explicitly put in "Api" but get "api" - It doesn't matter which way round ie starting with "ApI" and changing it to "api" , the old value gets left lying around on SOME classes despite trying to change them to the uppercase version of the lowercase version

exactly as we expected, "Api" exists, and "api" does not

and neither is within the ^oddPKG.

I've added the exact cut and paste from the xml file,  and everywhere we look, it refers to "Api", so I just don't know where the "api" has come from

kevin

JIT>write ##class(%Dictionary.CompiledClass).%ExistsId("jitPod.Api.toServer.logon"),!
1
 
JIT>write ##class(%Dictionary.CompiledClass).%ExistsId("jitPod.api.toServer.logon"),!
0
 
JIT>zwrite ^oddPKG($zcvt("jitPod.api", "U"))
 
JIT>zwrite ^oddPKG($zcvt("jitPod.Api", "U"))
 
JIT>

and here's the snippets from the xml file

    <ProjectItem name="jitPod.Api.toServer.logon" type="CLS"></ProjectItem>
 

<Class name="jitPod.Api.toServer.logon">
<Description>
the user is asking to login
{"username":"kvin", "password": "secret"}</Description>
<Super>%RegisteredObject,jitPod.masterfromServer</Super>
<TimeChanged>64720,52659.374435</TimeChanged>
<TimeCreated>64720,50933.101091</TimeCreated>
</Class>

Eduard,

Something still not right.

I've followed the steps exactly, and it's still wrong.

here's one of those files, The definition on line 3 clearly still wrongly refers to "api" (lowercase) but the workspace inspector  on the right clearly shows "Api"

the xml file was definitely edited to  be all uppercase "Api"

any other clues

kevin

thanks Eduard,

I'll try the steps.

it's the first time the process has failed in all these years, seems to be a little bit glitch somewhere

kevin

Hi Peter, Long time no hear. Hope you're well.

I'll try Eduard's answer first - seems comprehensive, but if that fails, I'll certainly be tying yours