Kevin Furze · Mar 16, 2018 go to post

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

Kevin Furze · Mar 16, 2018 go to post

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

Kevin Furze · Mar 15, 2018 go to post

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)

Kevin Furze · Mar 15, 2018 go to post

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

Kevin Furze · Mar 13, 2018 go to post

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

Kevin Furze · Mar 13, 2018 go to post

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

Kevin Furze · Mar 13, 2018 go to post

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>
Kevin Furze · Mar 13, 2018 go to post

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

Kevin Furze · Mar 13, 2018 go to post

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

Kevin Furze · Mar 13, 2018 go to post

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

Kevin Furze · Dec 18, 2017 go to post

Robert, 

can you give a simple example please.

I have an sql that I want to expose to ODBC, but that sql doesn't return sufficient for my MS-EXCEL to interpret,

At the moment, I run a classmethod that calls SQL, and then converts the result (including extra calculations for a further 3-4 columns) into a CSV file. 

I think It would be nicer to just call the "_ClassMethod()" over the odbc connection

kevin

Kevin Furze · Dec 5, 2017 go to post

not sure which "day" you want, so try this and you can take your pick of the format you want.

f i=1:1:13 w !,i,"-",$zd($h,i)

Kevin Furze · Nov 17, 2017 go to post

here in the middle of nowhere , I'm about 2-3 YEARS behind GMT, we still only have 14mb internet despite a direct feed from the bt exchange.

is 48 hours enough ??

Kevin Furze · Nov 16, 2017 go to post

Vitaliy.

Thanks for the article and the links, any source may? be a good source even when its 6 years old.  Luckily for us, cache is still cache.

Kevin Furze · Nov 15, 2017 go to post

Thanks Robert. I'll look at those classes.

one of the bits of info I was missing (obtained from Evgeny's reply) was that is DocBook.Utils thats doing the work. There's a lot of clues there.

I've been hunting through the %SYS classes and documatic, but no joy.

Kevin Furze · Nov 15, 2017 go to post

Evgeny,

thanks for that link.

Can you suggest where I can find the zip file this artical refers to please, Ive tried to find it through google translate, and even visiting intersystems.ru in the original language (I'm fluent enough to recognise "??.zip" files in the text - ha ha ) to see if I can obtain the zip file its referring to, but no joy.

Kevin Furze · Nov 13, 2017 go to post

Kevin Furze · Nov 13, 2017 go to post

Robert, thats something I can do quickly and safely, thanks for the instructons and the screen shots.

'll set it up tomorrow morning, and gif it a try.

Looks ike a great answer.

kev

Kevin Furze · Aug 1, 2017 go to post

opps, forgot

  • the ability to searchonly those topics I've already read (I know I have in this case)
  • the ability to search only the titles of the postings
Kevin Furze · May 25, 2017 go to post

Thank you for your help. I've run Dependency Walker and the only missing .dll are of the API-MS-WIN and EXT-MS-WIN variety which I believe are false negatives.

Kevin Furze · Jan 3, 2017 go to post

I've been playing with security on Cache Web Terminal and came up with one solution, but I've run into problems.
Can any one help please.

so. I went into the normal cache management portal, and added a new ROLE  that I called "webTerminalAccess" and then assigned it to just one user called "kevin"

I then edited WebTerminal.Engine and inserted the following lines after line 128

    d $System.Security.GetUserRecursedRoleSet(username,.accessRoles)
    if accessRoles'["webTerminalAccess" {
        return $LB("User " _ username _ " does NOT have access to the webTerminal ")
    }

when I test this patch for "kevin", it works correctly and allows me to log in.

If I log in with "Fred" (does not have "webTerminalAccess" role) it correctly shows me


Server refused WebSocket connection with the next message: User fred does NOT have access to the webTerminal See you!

but then I start to get problems. I have no ability to re-log in again with another username. it just repeatedly goes round and round repeating the same message.

I've allowed the session to timeout - same loop,
allowed timeout to run up to 24hrs - same loop.

If I comment out the new lines of code, then "fred" has access to the application.

do I have to do anything different to allow me to effectively reset the connection and log in again. - Its like I need to have the /logout followed by the /clear again.

no matter what I do, once the user is told "no access", I cannot log back on with ANY user (I'm stuck in "fred failed" mode)

Can any one help please

Kevin Furze · Jan 2, 2017 go to post

I've just installed the Caché Web Terminal now but I want to make it much more secure.  (v4.0.0-beta.12)

At the moment, any valid user in cache>System>Security Management>Users table can log in to the web terminal.

How can I restrict the user(s) to a specific group of users ?? (ie the programmers)

Is it possible to have a setting that says "kevin" is a valid user, "_SYSTEM" is not a valid user

Perhaps even ip based rules (or a combination of both)

kevin

Kevin Furze · Dec 8, 2016 go to post

the current implementation is CSP based and uses (user based) csp licences for the interaction. Because of the way csp retains that licence for a period after "finishing with the sesssion", it would be nice to be able to use a similar implementation that does make any use of the CSP licences

kevin

Kevin Furze · Dec 7, 2016 go to post

is it possible to adapt this RestAPI concept to work without using the CSP application ??

kevin

Kevin Furze · Oct 13, 2016 go to post

I think comments within the code counts a line, can you introduce a change that ignores comments/blank lines

Kevin Furze · Oct 12, 2016 go to post

will it be possible to "turn OFF" certain search areas ?

I don't have Ensemble installed, lets do away with those instantly - it must be easy to have a global switch "search only licenced options" and then automatically hide (totally - not even given the choices) anything that's not in your licence configuration

Kevin Furze · Sep 17, 2016 go to post

it depends what format your date-time is currently in but I just find it hard work to start messing about with $piece etc, I use the FOLLOWS command " ] "

USER>set date1=$zdth("01/02/2016 10:00")
 
USER>set date2=$zdth("01/02/2016 20:00")

USER>zwrite date1,date2
date1="63919,36000"
date2="63919,72000"
 
USER>write date1]date2
0
USER>write date2]date1
1
USER>

it works  in external format as well

USER>s date1="2016-02-01 10:00"
 
USER>s date2="2016-02-01 20:00"
 
USER>w date1]date2
0
USER>w date2]date1
1

kevin