How to call java apis


In my application, I have to make 3rd party java apis. Actually, I have
to use a sms gateway provider’s apis. They have a java sdk which I have
to use to send and receive sms. How can I call java apis from within a

In my controller, I have to receive request and use the java api to get
the data out of request. Process the data in controller action and then
send the result back as sms using the api to send sms. How can I call
java apis from a controller action ?


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.


Dave M.

I second that. It’s exactly what we’re doing on to wrap some java
api’s. We’re using Apache AXIS to help simplify things.