XML over HTTP
From AzureusWiki
Contents |
Description
This plugin lets you control Azureus using an XML over HTTP remote interface.
Author
- Parg (original author) (parg at users dot sourceforge dot net)
- amc1 (current maintainer) (amc1 at users dot sourceforge dot net)
Homepage
http://sourceforge.net/forum/forum.php?forum_id=377614
Downloads
Latest Stable v1.0 http://azureus.sourceforge.net/plugins/xml_http_if_1.0.zip
Version Notes
GTS irc plugin needs it. A more detailed description of the interface will be available soon.
Debugging
If you run into problems with the plugin that you find difficult to diagnose, go to the plugin configuration page, enable all settings in "Debug settings", and select to log in the "Plugin window" in the logging section. Then recreate what you did before, and send that information to the current maintainer of the plugin.
Don't forget to switch those settings off afterwards, otherwise it will result in the plugin working slower.
If you need to enable these settings using the Console UI, you can do the following:
set Plugin.xml_http_if.xmlhttp.config.option.debug.deserialisation true boolean set Plugin.xml_http_if.xmlhttp.config.option.debug.method_lookup true boolean set Plugin.xml_http_if.xmlhttp.config.option.debug.method_invocation true boolean set Plugin.xml_http_if.xmlhttp.config.option.debug.serialisation true boolean set Plugin.xml_http_if.xmlhttp.config.option.log_to_console true boolean
Again, disable all of these when you have finished debugging (replace all instances of "true" with "false").
You may also need to enable logging to file, as described here.
Related Projects
- DOPAL (Python library to interact with Azureus)
- TorrentFlux-b4rt (Provides remote web UI to Azureus using DOPAL and the XML/HTTP plugin)
User Comments
(please add your comments, tips, tricks, suggestions, reviews, and etc. here)
If you run into strange error messages, it could be caused by a used request id (they should be unique). The plugin caches requests (so that in the event of a connection error, you can safely re-repeat a request without it taking place twice), so rewriting a request may not always be acknowledged. Using random numbers for request ids should solve the problem.
Here's an example of the XML strings used to get and control the max upload speed:
<REQUEST>
<METHOD>getSingleton</METHOD>
<REQUEST_ID> $req_id </REQUEST_ID>
</REQUEST>
<REQUEST>
<OBJECT><_object_id> $plugin_if_oid </_object_id></OBJECT>
<METHOD>getPluginconfig</METHOD>
<CONNECTION_ID> $con_id </CONNECTION_ID>
<REQUEST_ID> $req_id </REQUEST_ID>
</REQUEST>
<REQUEST>
<OBJECT><_object_id> $pluginconf_oid </_object_id></OBJECT>
<METHOD>getParameter[String,int]</METHOD>
<PARAMS>
<ENTRY>Max Upload Speed KBs</ENTRY>
<ENTRY>0</ENTRY>
</PARAMS>
<CONNECTION_ID> $con_id </CONNECTION_ID>
<REQUEST_ID> $req_id </REQUEST_ID>
</REQUEST>
<REQUEST>
<OBJECT><_object_id> $pluginconf_oid </_object_id></OBJECT>
<METHOD>setParameter[String,int]</METHOD>
<PARAMS>
<ENTRY>Max Upload Speed KBs</ENTRY>
<ENTRY>6</ENTRY>
</PARAMS>
<CONNECTION_ID> $con_id </CONNECTION_ID>
<REQUEST_ID> $req_id </REQUEST_ID>
</REQUEST>
The names preceded with $ should be replaced with the numbers (ids) you received from previous responses, with the exception of $req_id, which you set yourself.
