blob: 2f1e6caa536e370b555f0e1125f6fd49eaed8e42 [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
17\begin{classdesc}{DocXMLRPCServer}{addr\optional{,
18 requestHandler\optional{, logRequests}}}
19
20Create a new server instance. All parameters have the same meaning as
21for \class{SimpleXMLRPCServer.SimpleXMLRPCServer};
22\var{requestHandler} defaults to \class{DocXMLRPCRequestHandler}.
23
24\end{classdesc}
25
26\begin{classdesc}{DocCGIXMLRPCRequestHandler}{}
27
28Create a new instance to handle XML-RPC requests in a CGI environment.
29
30\end{classdesc}
31
32\begin{classdesc}{DocXMLRPCRequestHandler}{}
33
34Create a new request handler instance. This request handler supports
35XML-RPC POST requests, documentation GET requests, and modifies
36logging so that the \var{logRequests} parameter to the
37\class{DocXMLRPCServer} constructor parameter is honored.
38
39\end{classdesc}
40
41\subsection{DocXMLRPCServer Objects \label{doc-xmlrpc-servers}}
42
43The \class{DocXMLRPCServer} class is derived from
44\class{SimpleXMLRPCServer.SimpleXMLRPCServer} and provides a means of
45creating self-documenting, stand alone XML-RPC servers. HTTP POST
46requests are handled as XML-RPC method calls. HTTP GET requests are
47handled by generating pydoc-style HTML documentation. This allows a
48server to provide its own web-based documentation.
49
50\begin{methoddesc}{set_server_title}{server_title}
51
52Set the title used in the generated HTML documentation. This title
53will be used inside the HTML "title" element.
54
55\end{methoddesc}
56
Martin v. Löwis07d4fb62003-04-18 21:48:13 +000057\begin{methoddesc}{set_server_name}{server_name}
Martin v. Löwis281b2c62003-04-18 21:04:39 +000058
59Set the name used in the generated HTML documentation. This name will
60appear at the top of the generated documentation inside a "h1"
61element.
62
63\end{methoddesc}
64
65
Martin v. Löwis07d4fb62003-04-18 21:48:13 +000066\begin{methoddesc}{set_server_documentation}{server_documentation}
Martin v. Löwis281b2c62003-04-18 21:04:39 +000067
68Set the description used in the generated HTML documentation. This
69description will appear as a paragraph, below the server name, in the
70documentation.
71
72\end{methoddesc}
73
74\subsection{DocCGIXMLRPCRequestHandler}
75
76The \class{DocCGIXMLRPCRequestHandler} class is derived from
77\class{SimpleXMLRPCServer.CGIXMLRPCRequestHandler} and provides a means
78of creating self-documenting, XML-RPC CGI scripts. HTTP POST requests
79are handled as XML-RPC method calls. HTTP GET requests are handled by
80generating pydoc-style HTML documentation. This allows a server to
81provide its own web-based documentation.
82
83\begin{methoddesc}{set_server_title}{server_title}
84
85Set the title used in the generated HTML documentation. This title
86will be used inside the HTML "title" element.
87
88\end{methoddesc}
89
90\begin{methoddesc}{set_server_name}{server_name}
91
92Set the name used in the generated HTML documentation. This name will
93appear at the top of the generated documentation inside a "h1"
94element.
95
96\end{methoddesc}
97
98
99\begin{methoddesc}{set_server_documentation}{server_documentation}
100
101Set the description used in the generated HTML documentation. This
102description will appear as a paragraph, below the server name, in the
103documentation.
104
105\end{methoddesc}