views:

213

answers:

3

Hi

I'm contemplating creating a web application using a Ruby on Rails/MySQL stack and I am wondering what capabilities are available around web services and SOAP. Is there a capability within the framework or does it require an extension and if so what?

+3  A: 

Rails opted for REST over SOAP:

It’ll probably come as no surprise that Rails has picked a side in the SOAP vs REST debate. Unless you absolutely have to use SOAP for integration purposes, we strongly discourage you from doing so. As a naturally extension of that, we’ve pulled ActionWebService from the default bundle. It’s only a gem install actionwebservice away, but it sends an important message none the less.

Still, if you must use SOAP, there's always soap4r, but it only supports SOAP 1.1. A better option might be WSF/Ruby. Mark Thomas has an example controller to help you get up and running.

Pesto
+2  A: 

The old way in Rails was to use the Action Web Service framework. The preferred way now is to use the ActiveResource framework for RESTful web services.

John Topley
FYI, that ActionWebService link (to the APIs at rubyonrails.org) is for an old version that won't work with Rails 2. Check out the datanoise-actionwebservice on github for an updated version.
Sarah Mei
+1  A: 

Rails has opted for REST over SOAP in the default framework. It's not hard to go the SOAP route if you want to, though.

I don't recommend soap4r - as of a few months ago, anyway, it wasn't production quality. The updated version of ActionWebService has worked much better for me.

Sarah Mei