you can have a look at the SDMS/test_webservice page, e.g.
It is possible to enter a command here and the result after execution will be displayed.
The technology behind it is pretty simple. The test_webservice page collects the entered data (HOST, PORT, USER, PASSWORD and COMMAND) and posts this to http://localhost:8080/SDMS/webservice
The webservice script executes the COMMAND, using the specified credentials USER and PASSWORD connected to the server that runs on HOST and listens at PORT.
It then returns the output of the command as a json structure.
Now your web-based application should be able to do the same as the test_webservice page does.
And feel free to look at the source code within Zope.
If you enter in your browser:
you'll get a json structure that gives you a list of current session.
Of course, you might need to use another user and/or password.