Search

Implement Trac XMLRPC API for Mylyn integration

Subscribe to Implement Trac XMLRPC API for Mylyn integration 8 post(s)

 
Hendy Irawan

On some projects we (still?) use Trac, hosted by a notable Unfuddle competitor.

The major pull (and quite major turnoff if using Unfuddle) is that it has great Mylyn integration support built-in when using Eclipse IDE, as that’s the IDE we use for -incidentally- all technologies we use: Flex Builder for Flex, Aptana for Ruby on Rails, and of course Eclipse JDT for Java.

Having Unfuddle implement the Trac XMLRPC API would be a tremendous feature.

See: http://trac-hacks.org/wiki/XmlRpcPlugin

 
Hendy Irawan

I’ve created a public open source project (ironically, not using Unfuddle) that implements the Trac XMLRPC API using Unfuddle API. (in other words, it exposes the Unfuddle API to Trac-conforming XML-RPC clients)

More info here: http://www.assembla.com/spaces/xmlrpcbridge

Download sources from http://svn2.assembla.com/svn/xmlrpcbridge/trunk/unfuddle_xmlrpc

Join the project if you’re interested to collaborate. Thanks.

PS: To Subventurate, feel free to use the code (if applicable) to implement on Unfuddle.

 
Hendy Irawan

From the project page:

Unfuddle Trac-like XML-RPC API

Does it work?

Yes, it does, partially (at least for now):

$ irb
irb(main):001:0> require ‘xmlrpc/client’
=> true
irb(main):002:0> proxy = XMLRPC::Client.new2(‘http://USER:PASS@localhost:8080/ACCOUNT/PROJECT/’)
=> #, @proxy_host=nil>
irb(main):003:0> proxy.call(‘ticket.query’, ‘status!=closed’) => [38, 53, 134, 136, ….] irb(main):004:0> proxy.call(‘ticket.get’, 1) => [1, 1186490051, 1188271213, {"severity"=>“normal”, “component”=>"", “cc”=>"", “status”=>“closed”, “resolution”=>“fixed”, “reporter”=>“ceefour”, “type”=>“defect”, “priority”=>“normal”, “version”=>"", “summary”=>"One welcome me……….

Overview (see README.txt file in SVN browser for more up-to-date version)

Unfuddle XML-RPC adapter
========

This library provides Trac XML-RPC adapter for Unfuddle projects.

Starting the server:

./server.rb

This will start the server on port 8080 (Ctrl+C to shutdown).
To change the port, set and export the environment variable XMLRPCSERVER_PORT.

[2008-03-30 21:10:18] INFO WEBrick 1.3.1
[2008-03-30 21:10:18] INFO ruby 1.8.6 (2007-06-07) [i486-linux]
Server URL:
http://localhost:8080/ACCOUNT/PROJECT/
https://localhost:8081/ACCOUNT/PROJECT/
Server URL for HTTPS Unfuddle accounts:
http://localhost:8080/ACCOUNT/PROJECT/
https://localhost:8081/secure/ACCOUNT/PROJECT/
Test using irb:
require ‘xmlrpc/client’
proxy = XMLRPC::Client.new2(‘http://USER:PASS@localhost:8080/ACCOUNT/PROJECT/’)
proxy.call(‘ticket.query’, ‘status!=closed’)
proxy.call(‘ticket.get’, 1)
[2008-03-30 21:10:23] INFO WEBrick::HTTPServer#start: pid=10608 port=8080

To test the server, open IRB and do what the server says upon startup:

require ‘xmlrpc/client’ proxy = XMLRPC::Client.new2(‘http://USER:PASS@localhost:8080/ACCOUNT/PROJECT/’) proxy.call(‘ticket.query’, ‘status!=closed’) proxy.call(‘ticket.get’, 1)

If your Unfuddle account supports/mandates secure connection, prepend “/secure” to the URL.
NOTE: Your connection to the XML-RPC server is still unencrypted unless you use the https form
for the XML-RPC connection itself.

Mylyn Support
-—————
The goal is to add seamless Mylyn support to Unfuddle projects.

This project will be archived when/if Subventure officially supports Trac XMLRPC syntax.

Project Info
-————-
Project page: http://www.assembla.com/spaces/xmlrpcbridge
Maintainer: Hendy Irawan
License: LGPLv3

 
Hendy Irawan

I’ve updated the API to be account and project agnostic.

You can test the live installation at our server with your own account (please don’t abuse the system) simply by using irb.

require ‘xmlrpc/client’ proxy = XMLRPC::Client.new2(‘http://USER:PASS@xl.soluvas.com:8090/ACCOUNT/PROJECT/’) proxy.call(‘ticket.query’, ‘status!=closed’) proxy.call(‘ticket.get’, 1)

(change USER, PASS, ACCOUNT, PROJECT, to your own)

Secure connection to that server (using fake SSL cert) is available on port 8091.

Note: I make no attempt of storing the provided credentials. All source is provided on project page, and it’s exactly what gets run on that server.

 
Hendy Irawan

The current state of project now supports:

  • HTTP connection with plain HTTP Unfuddle project
  • HTTP connection with HTTPS Unfuddle project
  • secure HTTPS connection with plain HTTP Unfuddle project
  • secure HTTPS connection with plain HTTPS Unfuddle project

Simply use the respective port, and respective URL.

 
Ben Dalton

Hendy,

I took a look at your implementation of this… looks very cool.

Unfortunately, I wasn’t able to make it work.

Have you abandoned this?

Thanks for the work on it so far!

-Ben

 
Hendy Irawan

Hi Ben,

Thank you. Yes I’ve abandoned it. :-)

Fortunately, Unfuddle will be having an official Mylyn connector soon. :-)

 
David C.

Hi Everyone

In case you missed the official announcement in the Unfuddle Blog, you can now find the Unfuddle Mylyn Connector here: http://unfuddle.com/plugins/mylyn