life.i.think: Ruby loves talking with Microsoft Small Business Accounting (thanks XML-RPC!)

Ruby loves talking with Microsoft Small Business Accounting (thanks XML-RPC!)
Scribbled on October 10th. 2 comments.

Today I played around with XML-RPC for the first time. We recently started using Microsoft Small Business server to track lots of things, most notably time spent on projects. Unfortunately, the provided interfaces to fill out timeslips … well, I’ll be nice in saying that they’re slightly lacking. (SBA seems like it has the potential to eventually become a fairly nice suite) My first run at things was to do a web interface in ASP.NET. A couple hours later and I reconfirmed my dislike for the framework, but I’ll leave that for another post.

So I wrote a quick XML-RPC interface to the Microsoft Small Business API using XML-RPC.NET. All total about 60 lines of code, which allows one to, in Ruby, do something like:

s = XMLRPC::Client.new2('http://voltaiccommerce.com/sba')
@customers = s.call('getCustomers')

This then returns key/value pairs for all of our customers in the database in the form of a list like:

[['1', 'Client1'], ['2', 'Client2'], ... ]

Combine this with LDAP Authentication and there are some pretty interesting possibilities.

Comments

Leave a response

  1. Jesse AndrewsOctober 11, 2005 @ 12:29 AM

    Very cool. Does XMLRPC::Client & XML-RPC.NET offer any security or do you need to pipe it through another protocol like SSL?

  2. BrittOctober 11, 2005 @ 01:08 AM

    XML-RPC provides no inherit security, but yes, because it sits on top of TCP something like SSL will work fine.

Comment