Changes between Version 101 and Version 102 of XmlRpcPlugin
- Timestamp:
- Mar 19, 2015, 9:40:06 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
XmlRpcPlugin
v101 v102 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 = Trac XML-RPC Plugin = 2 3 = Trac XML-RPC Plugin 3 4 4 5 Remote Procedure Call plugin for Trac 0.10 (not actively maintained) and 0.11/0.12/1.0/++ (trunk). 5 6 6 == Description ==7 == Description 7 8 8 9 This plugin allows Trac plugins to export select parts of their interface via XML-RPC and JSON-RPC (if json or simplejson is available). Latest trunk version includes a pluggable API for extending protocols, and see for instance TracRpcProtocolsPlugin for more protocols. … … 18 19 Protocol and method documentation for the latest version of the plugin can be found [/rpc here]. 19 20 20 == Todo == 21 22 Outstanding tasks are roadmap, timeline, user management (e.g. get a (filtered) user list to assign a task in [http://eclipse.org/mylyn/ mylyn]), plugin management (?)...plus probably more. 23 24 == Installation == 21 == Todo 22 23 Outstanding tasks are roadmap, timeline, user management, for example get a (filtered) user list to assign a task in [http://eclipse.org/mylyn/ mylyn]), plugin management, plus probably more. 24 25 == Bugs/Feature Requests == 26 27 Existing bugs and feature requests for XmlRpcPlugin are [query:status!=closed&component=XmlRpcPlugin&order=priority here]. If you have any issues, create a [/newticket?component=XmlRpcPlugin&owner=osimons&cc=olemis new ticket]. 28 29 [[TicketQuery(component=XmlRpcPlugin&group=type,format=progress)]] 30 31 == Download and Source 32 33 Download the [download:xmlrpcplugin zipped source], check out the [/svn/xmlrpcplugin source using Subversion] or [source:xmlrpcplugin browse the source] with Trac. 34 35 Experimental features and work in progress can be found at a [http://bitbucket.org/osimons/trac-rpc-mq/ patches repository hosted by Bitbucket]. Work in progress is developed using [http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html Mercurial Queues]. 36 37 For enhanced compatibility with [wiki:bloodhound Apache™ Bloodhound]>=0.6 download ''BloodhoundRPC'' fork from [https://bitbucket.org/olemis/bloodhound-rpc this repository] and check out `bloodhound_rpc` branch. 38 39 == Installation 25 40 26 41 This plugin ''requires'' at least Trac 0.10, but Trac 0.11 or 0.12 is recommended. 27 42 28 Install in the same manner as any other Trac plugin (if you do install by this method, make sure the egg-file in dist/-folder does not contain any letters before you copy. Else, if for example the egg file is TracXMLRPC-1.1.2.post0-py2.7.egg, you will have an error that post0 is not an int, when you connect via XML-RPC from Eclipse, just rename the egg-file to TracXMLRPC-1.1.2-py2.7.egg and you will be fine.): 43 Install in the same manner as any other Trac plugin: 44 29 45 {{{#!sh 30 $ python setup.py bdist_egg 31 $ cp dist/*.egg /srv/trac/env/plugins 32 }}} 33 34 or if you want it to be installed for all Trac environments (same command can be run later to refresh installation): 46 python setup.py bdist_egg 47 cp dist/*.egg /srv/trac/env/plugins 48 }}} 49 50 Make sure the egg-file in dist/-folder does not contain any letters before you copy. Else, if for example the egg file is TracXMLRPC-1.1.2.post0-py2.7.egg, you will have an error that post0 is not an int, when you connect via XML-RPC from Eclipse, just rename the egg-file to TracXMLRPC-1.1.2-py2.7.egg and you will be fine. 51 52 If you want it to be installed for all Trac environments, then depending on the version of Trac you are running: 35 53 36 54 {{{ 37 55 #!sh 38 $ easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/trunk # 0.11/0.12/1.0/++ 39 $ #or 40 $ easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/0.10 # 0.10 41 $ # or 42 $ easy_install -Z -U /path/to/unpacked/download/version 56 easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/trunk # 0.11/0.12/1.0/++ 57 easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/0.10 # 0.10 58 easy_install -Z -U /path/to/unpacked/download/version 43 59 }}} 44 60 45 You will also need to enable the plugin in your environments `trac.ini`: 61 The same command can be run later to refresh the installation. 62 63 You will also need to enable the plugin in your `trac.ini` file: 46 64 47 65 {{{ … … 51 69 }}} 52 70 53 == Bugs/Feature Requests == 54 55 Existing bugs and feature requests for XmlRpcPlugin are [query:status!=closed&component=XmlRpcPlugin&order=priority here]. If you have any issues, create a [/newticket?component=XmlRpcPlugin&owner=osimons&cc=olemis new ticket]. 56 57 == Troubleshooting == 58 59 === Problems when AccountManagerPlugin is enabled === 60 If you have the AccountManagerPlugin enabled and you followed their advice/example to disable the standard login module with 71 == Troubleshooting 72 73 === Problems when AccountManagerPlugin is enabled 74 75 If you have the AccountManagerPlugin enabled and you followed their advice/example to disable the standard login module as follows: 76 61 77 {{{ 62 78 #!ini … … 64 80 trac.web.auth.LoginModule = disabled 65 81 }}} 66 the /login/xmlrpc URL for authorized access will not work as expected. Every access will look like anonymous access. 82 83 then the /login/xmlrpc URL for authorized access will not work as expected. Every access will look like anonymous access. 67 84 68 85 ~~You can use the HttpAuthPlugin to correct this.~~ 69 86 70 The recommended approach to make it work is to add the following configuration in TracIni 71 72 {{{ #!ini73 87 The recommended approach to make it work is to add the following configuration in TracIni: 88 89 {{{ 90 #!ini 74 91 [account-manager] 75 92 environ_auth_overwrite = false 76 93 }}} 77 94 78 === Problems with ''Digest'' HTTP authentication ===79 80 The `xmlrpclib.ServerProxy` client - as demonstrated in the following examples -will not work with a ''Digest''-based HTTP authentication: you need to set up a ''Basic'' HTTP authentication on server side to make the examples work.95 === Problems with ''Digest'' HTTP authentication 96 97 The `xmlrpclib.ServerProxy` client, as demonstrated in the following examples, will not work with a ''Digest''-based HTTP authentication: you need to set up a ''Basic'' HTTP authentication on server side to make the examples work. 81 98 82 99 If you use the standalone Trac daemon, this means that you cannot use the `tracd -a` option (htdigest authentication file). Use `trac --basic-auth` (htpasswd authentication file) instead. 83 100 84 === Problems with mod_python, Apache, python 2.4 === 85 86 XmlRpcPlugin might not work with Apache and python 2.4 as explained in [http://trac.edgewall.org/wiki/TracInstall#Requirements TracInstall]. Use python 2.5 if you want to run Trac with mod_python. 87 88 == Download and Source == 89 90 Download the [download:xmlrpcplugin zipped source], check out the [/svn/xmlrpcplugin source using Subversion] or [source:xmlrpcplugin browse the source] with Trac. 91 92 Experimental features and work in progress can be found at a [http://bitbucket.org/osimons/trac-rpc-mq/ patches repository hosted by Bitbucket]. Work in progress is developed using [http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html Mercurial Queues]. 93 94 For enhanced compatibility with [wiki:bloodhound Apache™ Bloodhound]>=0.6 download ''BloodhoundRPC'' fork from [https://bitbucket.org/olemis/bloodhound-rpc this repository] and check out `bloodhound_rpc` branch. 95 96 == Example == 97 NOTE: The '''xmlrpclib''' module has been renamed to '''xmlrpc.client''' in Python 3.0. 101 === Problems with mod_python, Apache, Python 2.4 102 103 XmlRpcPlugin might not work with Apache and Python 2.4 as explained in [http://trac.edgewall.org/wiki/TracInstall#Requirements TracInstall]. Use Python 2.5 if you want to run Trac with mod_python. 104 105 == Example 106 107 '''Note''': The '''xmlrpclib''' module has been renamed to '''xmlrpc.client''' in Python 3.0. 98 108 99 109 See [http://docs.python.org/library/xmlrpclib.html] for further information. 100 110 101 === Python End-User Usage ===111 === Python End-User Usage 102 112 103 113 Obtain and print a list of XML-RPC exported functions available to my user: … … 115 125 }}} 116 126 117 The same example using `system.multicall()`. This reduces network and server 118 load by compacting all of the `system.methodHelp()` calls into one HTTP POST. 127 The same example using `system.multicall()`. This reduces network and server load by compacting all of the `system.methodHelp()` calls into one HTTP POST. 119 128 120 129 {{{ … … 136 145 }}} 137 146 138 List all tickets that are owned by athomas, using the XML-RPC multicall system 139 to issue multiple RPC calls with one HTTP request: 147 List all tickets that are owned by athomas, using the XML-RPC multicall system to issue multiple RPC calls with one HTTP request: 140 148 141 149 {{{ … … 151 159 }}} 152 160 153 Access the Wiki with [http://www.jspwiki.org/Wiki.jsp?page=WikiRPCInterface2 WikiRPC] 161 Access the Wiki with [http://www.jspwiki.org/Wiki.jsp?page=WikiRPCInterface2 WikiRPC]: 162 154 163 {{{ 155 164 #!python … … 180 189 }}} 181 190 182 ==== Using Digest Authentication in python ==== 183 One can use digest authentication if you know the realm that you're connecting to. This shows up in the login box "server says '<realm'". 191 ==== Using Digest Authentication in Python 192 193 One can use digest authentication if you know the realm that you are connecting to. This shows up in the login box "server says '<realm'". 184 194 185 195 {{{ … … 226 236 }}} 227 237 228 229 === Using from C# === 230 238 === Using from C# 239 231 240 See XmlRpcPlugin/DotNet. 232 241 233 === Using from Java ===234 235 See [/raw-attachment/wiki/XmlRpcPlugin/trac_xml_rpc_example_java.zip this example zip file]242 === Using from Java 243 244 See this [/raw-attachment/wiki/XmlRpcPlugin/trac_xml_rpc_example_java.zip example zip file]. 236 245 237 246 ==== Related issues #rpc-java-issues … … 239 248 [[TicketQuery(component=XmlRpcPlugin, keywords=~java)]] 240 249 241 === Using from Ruby ===250 === Using from Ruby 242 251 243 252 See XmlRpcPlugin/Ruby. 244 253 245 === API Usage ===254 === API Usage 246 255 247 256 See the [source:xmlrpcplugin/0.10/tracrpc/api.py source] for details. 248 257 249 == Screenshot ==250 251 Accessing the RPC handler through a browser (at `/rpc` or `/login/rpc`) will provide the documentation of protocols and available methods .252 253 254 255 == Change Log ==256 257 [[ChangeLog(/xmlrpcplugin, 5)]]258 259 == Author/Contributors ==258 == Screenshot 259 260 Accessing the RPC handler through a browser (at `/rpc` or `/login/rpc`) will provide the documentation of protocols and available methods: 261 262 [[Image(tracrpc.png)]] 263 264 == Change Log 265 266 [[ChangeLog(/xmlrpcplugin, 3)]] 267 268 == Author/Contributors 260 269 261 270 '''Authors and contributors:''' [wiki:athomas], [wiki:mgood], [wiki:osimons], [wiki:olemis Olemis Lang] [[BR]] 262 '''Maintainer:''' [ wiki:osimons] [[BR]]271 '''Maintainer:''' [[Maintainer]] [[BR]]