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

Collapse
Posted by Tom Jackson on
Claudio,

Both errors you have reported are due to the fact that a server isn't defined. When you use nstclsh, as a command line tool, you will not have certain functions and data structures: ns_conn, etc. This is normal, it is not a bug. To use tWSDL to deliver a service, you must currently use a virtual server.

Virtual servers are enabled by moving the nssock* drivers to the global modules ns_section:

ns_section ns/servers
ns_param jnm {Junom Server}
ns_param twsdl {tWSDL}

ns_section ns/modules
ns_param nssock1 $bindir/nssock.so

ns_section ns/module/nssock1
ns_param port 8001
ns_param hostname example.com
ns_param address 192.168.1.102
# Important:
ns_param defaultserver jnm

# Virtual Server Host headers:
ns_section ns/module/nssock1/servers
ns_param jnm maria:8001
ns_param jnm junom:8001
ns_param jnm 192.168.1.102:8001

There are probably other changes to enable virtual servers, but maybe someone has done this for OpenACS?

The other option is to replace the script in wsdl-server-init.tcl.