blob: 0dd4c6d700f492b9421328532e864a6c5e5da7ac [file] [log] [blame]
Martin v. Löwis281b2c62003-04-18 21:04:39 +00001\section{\module{DocXMLRPCServer} ---
2 Self-documenting XML-RPC server}
3
4\declaremodule{standard}{DocXMLRPCServer}
5\modulesynopsis{Self-documenting XML-RPC server implementation.}
6\moduleauthor{Brian Quinlan}{brianq@activestate.com}
7\sectionauthor{Brian Quinlan}{brianq@activestate.com}
8
9\versionadded{2.3}
10
11The \module{DocXMLRPCServer} module extends the classes found in
12\module{SimpleXMLRPCServer} to serve HTML documentation in response to
13HTTP GET requests. Servers can either be free standing, using
14\class{DocXMLRPCServer}, or embedded in a CGI environment, using
15\class{DocCGIXMLRPCRequestHandler}.
16
Collin Winterae041062007-03-10 14:41:48 +000017\begin{classdesc}{DocXMLRPCServer}{addr\optional{,
18 requestHandler\optional{,
19 logRequests\optional{,
20 allow_none\optional{,
21 encoding\optional{,
22 bind_and_activate}}}}}}
Martin v. Löwis281b2c62003-04-18 21:04:39 +000023
24Create a new server instance. All parameters have the same meaning as
25for \class{SimpleXMLRPCServer.SimpleXMLRPCServer};
26\var{requestHandler} defaults to \class{DocXMLRPCRequestHandler}.
27
28\end{classdesc}
29
30\begin{classdesc}{DocCGIXMLRPCRequestHandler}{}
31
32Create a new instance to handle XML-RPC requests in a CGI environment.
33
34\end{classdesc}
35
36\begin{classdesc}{DocXMLRPCRequestHandler}{}
37
38Create a new request handler instance. This request handler supports
39XML-RPC POST requests, documentation GET requests, and modifies
40logging so that the \var{logRequests} parameter to the
41\class{DocXMLRPCServer} constructor parameter is honored.
42
43\end{classdesc}
44
45\subsection{DocXMLRPCServer Objects \label{doc-xmlrpc-servers}}
46
47The \class{DocXMLRPCServer} class is derived from
48\class{SimpleXMLRPCServer.SimpleXMLRPCServer} and provides a means of
49creating self-documenting, stand alone XML-RPC servers. HTTP POST
50requests are handled as XML-RPC method calls. HTTP GET requests are
51handled by generating pydoc-style HTML documentation. This allows a
52server to provide its own web-based documentation.
53
54\begin{methoddesc}{set_server_title}{server_title}
55
56Set the title used in the generated HTML documentation. This title
57will be used inside the HTML "title" element.
58
59\end{methoddesc}
60
Martin v. Löwis07d4fb62003-04-18 21:48:13 +000061\begin{methoddesc}{set_server_name}{server_name}
Martin v. Löwis281b2c62003-04-18 21:04:39 +000062
63Set the name used in the generated HTML documentation. This name will
64appear at the top of the generated documentation inside a "h1"
65element.
66
67\end{methoddesc}
68
69
Martin v. Löwis07d4fb62003-04-18 21:48:13 +000070\begin{methoddesc}{set_server_documentation}{server_documentation}
Martin v. Löwis281b2c62003-04-18 21:04:39 +000071
72Set the description used in the generated HTML documentation. This
73description will appear as a paragraph, below the server name, in the
74documentation.
75
76\end{methoddesc}
77
78\subsection{DocCGIXMLRPCRequestHandler}
79
80The \class{DocCGIXMLRPCRequestHandler} class is derived from
81\class{SimpleXMLRPCServer.CGIXMLRPCRequestHandler} and provides a means
82of creating self-documenting, XML-RPC CGI scripts. HTTP POST requests
83are handled as XML-RPC method calls. HTTP GET requests are handled by
84generating pydoc-style HTML documentation. This allows a server to
85provide its own web-based documentation.
86
87\begin{methoddesc}{set_server_title}{server_title}
88
89Set the title used in the generated HTML documentation. This title
90will be used inside the HTML "title" element.
91
92\end{methoddesc}
93
94\begin{methoddesc}{set_server_name}{server_name}
95
96Set the name used in the generated HTML documentation. This name will
97appear at the top of the generated documentation inside a "h1"
98element.
99
100\end{methoddesc}
101
102
103\begin{methoddesc}{set_server_documentation}{server_documentation}
104
105Set the description used in the generated HTML documentation. This
106description will appear as a paragraph, below the server name, in the
107documentation.
108
109\end{methoddesc}