Forum OpenACS Development: Re: Tcl Web Services Toolkit: TWiST

Collapse
Posted by Tom Jackson on
Claudio,

Yes, it works as expected even with that error on startup. I developed this on 4.5, but when I tested it on an older AOLserver, I got the same problem. (but it looks like yours is also 4.5?) This will affect the startup of tWSDL services (since no calls to ns_register_proc), so I'll need to address it at some point to figure out why the error shows up.

TWiST works because it uses the default process to return a page in pageroot.

tWSDL has a series of packages in a structure similar to but independent from OpenACS. Installation into OpenACS should be exactly the same as regular AOLserver. Some packages have a www directory, and to use the files, just symlink them where you want (from parent directory):

ln -s /path/to/and/including/package/www mydir

But note that only the www files go under pageroot, all the others are library files.

One thing I haven't discussed is ideas on where to put the TWiST configuration files, but short and simple, you can keep them with the API that you are exposing in a separate file, using whatever name you thing is best, but making sure that it doesn't get sourced at startup. Then create a directory structure under pageroot to reflect the overall hierarchy of your web services. Each directory then gets a symlink from the TWiST config file to an index.tcl file in that directory. That way, you get everything in one place. If you have directory browsing setup, then it will work like

http://junom.com/ws/

Subdirectories will have separate services and no annoying tcl file in the service URL.

Also, for those interested, the same TWiST script will probably work inside an adp file.