1 | \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 |
|
---|
11 | The \module{DocXMLRPCServer} module extends the classes found in
|
---|
12 | \module{SimpleXMLRPCServer} to serve HTML documentation in response to
|
---|
13 | HTTP 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 |
|
---|
20 | Create a new server instance. All parameters have the same meaning as
|
---|
21 | for \class{SimpleXMLRPCServer.SimpleXMLRPCServer};
|
---|
22 | \var{requestHandler} defaults to \class{DocXMLRPCRequestHandler}.
|
---|
23 |
|
---|
24 | \end{classdesc}
|
---|
25 |
|
---|
26 | \begin{classdesc}{DocCGIXMLRPCRequestHandler}{}
|
---|
27 |
|
---|
28 | Create a new instance to handle XML-RPC requests in a CGI environment.
|
---|
29 |
|
---|
30 | \end{classdesc}
|
---|
31 |
|
---|
32 | \begin{classdesc}{DocXMLRPCRequestHandler}{}
|
---|
33 |
|
---|
34 | Create a new request handler instance. This request handler supports
|
---|
35 | XML-RPC POST requests, documentation GET requests, and modifies
|
---|
36 | logging 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 |
|
---|
43 | The \class{DocXMLRPCServer} class is derived from
|
---|
44 | \class{SimpleXMLRPCServer.SimpleXMLRPCServer} and provides a means of
|
---|
45 | creating self-documenting, stand alone XML-RPC servers. HTTP POST
|
---|
46 | requests are handled as XML-RPC method calls. HTTP GET requests are
|
---|
47 | handled by generating pydoc-style HTML documentation. This allows a
|
---|
48 | server to provide its own web-based documentation.
|
---|
49 |
|
---|
50 | \begin{methoddesc}{set_server_title}{server_title}
|
---|
51 |
|
---|
52 | Set the title used in the generated HTML documentation. This title
|
---|
53 | will be used inside the HTML "title" element.
|
---|
54 |
|
---|
55 | \end{methoddesc}
|
---|
56 |
|
---|
57 | \begin{methoddesc}{set_server_name}{server_name}
|
---|
58 |
|
---|
59 | Set the name used in the generated HTML documentation. This name will
|
---|
60 | appear at the top of the generated documentation inside a "h1"
|
---|
61 | element.
|
---|
62 |
|
---|
63 | \end{methoddesc}
|
---|
64 |
|
---|
65 |
|
---|
66 | \begin{methoddesc}{set_server_documentation}{server_documentation}
|
---|
67 |
|
---|
68 | Set the description used in the generated HTML documentation. This
|
---|
69 | description will appear as a paragraph, below the server name, in the
|
---|
70 | documentation.
|
---|
71 |
|
---|
72 | \end{methoddesc}
|
---|
73 |
|
---|
74 | \subsection{DocCGIXMLRPCRequestHandler}
|
---|
75 |
|
---|
76 | The \class{DocCGIXMLRPCRequestHandler} class is derived from
|
---|
77 | \class{SimpleXMLRPCServer.CGIXMLRPCRequestHandler} and provides a means
|
---|
78 | of creating self-documenting, XML-RPC CGI scripts. HTTP POST requests
|
---|
79 | are handled as XML-RPC method calls. HTTP GET requests are handled by
|
---|
80 | generating pydoc-style HTML documentation. This allows a server to
|
---|
81 | provide its own web-based documentation.
|
---|
82 |
|
---|
83 | \begin{methoddesc}{set_server_title}{server_title}
|
---|
84 |
|
---|
85 | Set the title used in the generated HTML documentation. This title
|
---|
86 | will be used inside the HTML "title" element.
|
---|
87 |
|
---|
88 | \end{methoddesc}
|
---|
89 |
|
---|
90 | \begin{methoddesc}{set_server_name}{server_name}
|
---|
91 |
|
---|
92 | Set the name used in the generated HTML documentation. This name will
|
---|
93 | appear at the top of the generated documentation inside a "h1"
|
---|
94 | element.
|
---|
95 |
|
---|
96 | \end{methoddesc}
|
---|
97 |
|
---|
98 |
|
---|
99 | \begin{methoddesc}{set_server_documentation}{server_documentation}
|
---|
100 |
|
---|
101 | Set the description used in the generated HTML documentation. This
|
---|
102 | description will appear as a paragraph, below the server name, in the
|
---|
103 | documentation.
|
---|
104 |
|
---|
105 | \end{methoddesc}
|
---|