The most generic solution I can think of would be to wrap the Java SMS
API so that it's exposed through 1 or more Web Service APIs. You
could write the wrapper in either Java or Ruby/JRuby.
I regularly use this approach to talk to "foreign" APIs; I just
finished doing exactly this to let me refer to a datastore that's
actually a TestDirector defect database.