Actually, pyws is not a server, it’s a library allowing developers to easily integrate SOAP based web services into a web project. The basic workflow looks like this:
A more sophisticated scenario, however, might also include:
The entry point to pyws is an adapter. It can be anything you want and its role is to tie pyws and your project together. An adapter must create and feed a request object to a server, after which the latter performs several actions.
Firstly, the server defines a protocol. If there is only one protocol registered then the server uses it by default, otherwise the server determines a protocol based on the request data.
Secondly, the server tells the protocol to extract the name of the function to be called. Then the server asks the protocol to extract context data from the request and creates a context.
Thirdly, the server tries to find a function by its name, querying each of its function managers. Then the server asks the protocol to extract argument values from the request.
Fourthly, the server calls the function with these argument values, complete argument values validation is performed here too.
Finally, the server creates a response object using the protocol and returns it to the adapter. That is it.