| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="module-DocXMLRPCServer.html" /> |
| 13 | <link rel="prev" href="module-xmlrpclib.html" /> |
| 14 | <link rel="parent" href="internet.html" /> |
| 15 | <link rel="next" href="simple-xmlrpc-servers.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>11.23 SimpleXMLRPCServer -- Basic XML-RPC server</title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="11.22.9 Example of Client" |
| 25 | href="xmlrpc-client-example.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="11. Internet Protocols and" |
| 28 | href="internet.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="11.23.1 SimpleXMLRPCServer Objects" |
| 31 | href="simple-xmlrpc-servers.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="xmlrpc-client-example.html">11.22.9 Example of Client</A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="internet.html">11. Internet Protocols and</A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="simple-xmlrpc-servers.html">11.23.1 SimpleXMLRPCServer Objects</A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H1><A NAME="SECTION00132300000000000000000"> |
| 56 | 11.23 <tt class="module">SimpleXMLRPCServer</tt> -- |
| 57 | Basic XML-RPC server</A> |
| 58 | </H1> |
| 59 | |
| 60 | <P> |
| 61 | <A NAME="module-SimpleXMLRPCServer"></A> |
| 62 | |
| 63 | <P> |
| 64 | The <tt class="module">SimpleXMLRPCServer</tt> module provides a basic server |
| 65 | framework for XML-RPC servers written in Python. Servers can either |
| 66 | be free standing, using <tt class="class">SimpleXMLRPCServer</tt>, or embedded in a |
| 67 | CGI environment, using <tt class="class">CGIXMLRPCRequestHandler</tt>. |
| 68 | |
| 69 | <P> |
| 70 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 71 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-3720' xml:id='l2h-3720' class="class">SimpleXMLRPCServer</tt></b>(</nobr></td> |
| 72 | <td><var>addr</var><big>[</big><var>, |
| 73 | requestHandler</var><big>[</big><var>, logRequests</var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt> |
| 74 | <dd> |
| 75 | |
| 76 | <P> |
| 77 | Create a new server instance. The <var>requestHandler</var> parameter |
| 78 | should be a factory for request handler instances; it defaults to |
| 79 | <tt class="class">SimpleXMLRPCRequestHandler</tt>. The <var>addr</var> and |
| 80 | <var>requestHandler</var> parameters are passed to the |
| 81 | <tt class="class"><tt class="module"><a href="module-SocketServer.html">SocketServer</a></tt>.TCPServer</tt> constructor. If |
| 82 | <var>logRequests</var> is true (the default), requests will be logged; |
| 83 | setting this parameter to false will turn off logging. This class |
| 84 | provides methods for registration of functions that can be called by |
| 85 | the XML-RPC protocol. |
| 86 | </dl> |
| 87 | |
| 88 | <P> |
| 89 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 90 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-3721' xml:id='l2h-3721' class="class">CGIXMLRPCRequestHandler</tt></b>(</nobr></td> |
| 91 | <td><var></var>)</td></tr></table></dt> |
| 92 | <dd> |
| 93 | Create a new instance to handle XML-RPC requests in a CGI |
| 94 | environment. |
| 95 | <span class="versionnote">New in version 2.3.</span> |
| 96 | |
| 97 | </dl> |
| 98 | |
| 99 | <P> |
| 100 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 101 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-3722' xml:id='l2h-3722' class="class">SimpleXMLRPCRequestHandler</tt></b>(</nobr></td> |
| 102 | <td><var></var>)</td></tr></table></dt> |
| 103 | <dd> |
| 104 | Create a new request handler instance. This request handler |
| 105 | supports <code>POST</code> requests and modifies logging so that the |
| 106 | <var>logRequests</var> parameter to the <tt class="class">SimpleXMLRPCServer</tt> |
| 107 | constructor parameter is honored. |
| 108 | </dl> |
| 109 | |
| 110 | <P> |
| 111 | |
| 112 | <p><br /></p><hr class='online-navigation' /> |
| 113 | <div class='online-navigation'> |
| 114 | <!--Table of Child-Links--> |
| 115 | <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> |
| 116 | |
| 117 | <UL CLASS="ChildLinks"> |
| 118 | <LI><A href="simple-xmlrpc-servers.html">11.23.1 SimpleXMLRPCServer Objects</a> |
| 119 | <LI><A href="node564.html">11.23.2 CGIXMLRPCRequestHandler</a> |
| 120 | </ul> |
| 121 | <!--End of Table of Child-Links--> |
| 122 | </div> |
| 123 | |
| 124 | <DIV CLASS="navigation"> |
| 125 | <div class='online-navigation'> |
| 126 | <p></p><hr /> |
| 127 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 128 | <tr> |
| 129 | <td class='online-navigation'><a rel="prev" title="11.22.9 Example of Client" |
| 130 | href="xmlrpc-client-example.html"><img src='../icons/previous.png' |
| 131 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 132 | <td class='online-navigation'><a rel="parent" title="11. Internet Protocols and" |
| 133 | href="internet.html"><img src='../icons/up.png' |
| 134 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 135 | <td class='online-navigation'><a rel="next" title="11.23.1 SimpleXMLRPCServer Objects" |
| 136 | href="simple-xmlrpc-servers.html"><img src='../icons/next.png' |
| 137 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 138 | <td align="center" width="100%">Python Library Reference</td> |
| 139 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 140 | href="contents.html"><img src='../icons/contents.png' |
| 141 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 142 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 143 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 144 | <td class='online-navigation'><a rel="index" title="Index" |
| 145 | href="genindex.html"><img src='../icons/index.png' |
| 146 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 147 | </tr></table> |
| 148 | <div class='online-navigation'> |
| 149 | <b class="navlabel">Previous:</b> |
| 150 | <a class="sectref" rel="prev" href="xmlrpc-client-example.html">11.22.9 Example of Client</A> |
| 151 | <b class="navlabel">Up:</b> |
| 152 | <a class="sectref" rel="parent" href="internet.html">11. Internet Protocols and</A> |
| 153 | <b class="navlabel">Next:</b> |
| 154 | <a class="sectref" rel="next" href="simple-xmlrpc-servers.html">11.23.1 SimpleXMLRPCServer Objects</A> |
| 155 | </div> |
| 156 | </div> |
| 157 | <hr /> |
| 158 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 159 | </DIV> |
| 160 | <!--End of Navigation Panel--> |
| 161 | <ADDRESS> |
| 162 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 163 | </ADDRESS> |
| 164 | </BODY> |
| 165 | </HTML> |