Forgive me, but it sounds like you want to grab the code and start hacking away at it so it looks like OpenACS code.
Please respect that TWiST and tWSDL are part of an independent project. I intend to be responsive in maintaining the code and providing examples of use and documentation. However I use a very simple framework to do this, and it works with Tcl, AOLserver and OpenACS as-is.
Project Home: http://code.google.com/p/twsdl/
1) I'm not sure why you would need to directly source this file, what exactly did you do, or what instructions did you follow? What is the special call you tried? What were you expecting to happen? You should only source the top level init.tcl file, which will handle startup:
http://twsdl.googlecode.com/svn/trunk/init.tcl
You might edit a local configuration file to remove any unneeded packages:
http://twsdl.googlecode.com/svn/trunk/packages/tws/tcl/tws-local-conf.tcl
For instance, you can remove the tdom package if it is already loaded in OpenACS. (Just edit the package list in the above file.) Also StockQuoter isn't needed.
2) Which global variables? Do you mean namespace vars? TWiST and tWSDL operate on a database of information that I call WSDB. In short there is lots of information and procedures behind the scene. In fact, a lot of code is autogenerated from the API calls. This info/procs are 'stored' in Tcl namespaces. NSVs lack structure, they are just shared arrays. The only way to understand the WSDB is to look at it in a running server. How? Link the inspect package somewhere where you can look at what is in the database (::wsdb::*)
http://twsdl.googlecode.com/svn/trunk/packages/inspect/www/
3) No, please don't do this. tWSDL and TWiST are library code, and a completely separate project. An OpenACS package should use the API, but not modify. Of course, the OpenACS package should somehow download the correct release. I can help support this option, probably this needs some best practices input. Does any other package incorporate external code? It would be nice to see how it is done. Further documentation for the project is here:
http://twsdl.googlecode.com/svn/trunk/packages/doc/
4) the <ws>type and <ws>element procs are in the main trunk:
http://twsdl.googlecode.com/svn/trunk/packages/wsapi/tcl/ws-procs.tcl
Example of use is the stockquoter example (converted from tWSDL):
http://twsdl.googlecode.com/svn/trunk/packages/wsapi/www/stockquoter/index.tcl
When you get TWiST sourced, you can link the wsapi/www directory under pageroot to test things out.
Also note that I have some promised upgrades to tWSDL and TWiST in dealing with procedures which take or return arrays or lists, or lists of arrays or lists. I thought this was going to be a simple process, but I'm taking the opportunity to simplify and generalize the code. It's looking good, maybe the end of this week. Once this is done it should be very simple to extend this to cover ns_sets as input/output (One short procedure). Documentation overhaul will start once this is finished.