Create SOAP Webservice with Rails 3

Hello,
I'm just getting started with Rails, and for my first project I want
to create a Rails app that is nothing more that a SOAP web service.
From what I have been able to figure out it looks like with Rails 2
there was a web services framework of some sort. I have been
struggling to find anything on Rails 3. Oh yea, yes it has to be
SOAP :slight_smile: , we have SOAP clients and apps already and we have no plans
to move to anything else, for now.

Is there a good article or something on getting started with this?

Thanks,
Charlie

Rails favor REST architecture then SOAP, if you must do soap, checkout this threads

http://stackoverflow.com/questions/2146669/rails-using-another-apps-soap-interface
http://stackoverflow.com/questions/40273/whats-the-best-way-to-use-soap-with-ruby

Skellington wrote in post #969532:

Hello,
I'm just getting started with Rails, and for my first project I want
to create a Rails app that is nothing more that a SOAP web service.
From what I have been able to figure out it looks like with Rails 2
there was a web services framework of some sort. I have been
struggling to find anything on Rails 3. Oh yea, yes it has to be
SOAP :slight_smile: , we have SOAP clients and apps already and we have no plans
to move to anything else, for now.

Is there a good article or something on getting started with this?

This is just my own opinion, but if all you want from Rails is to
provide a SOAP web service then choose something other that Rails. I'm
very much a fan of Rails, but I think you'll have an uphill battle.
Rails is very opinionated against SOAP, as am I.

I'd say, do yourself a favor and either use Rails as it is intended,
which is to provide web services through REST. Or find a framework you
won't have to fight against every step of the way.

Robert Walker wrote in post #969562:

Skellington wrote in post #969532:

Hello,
I'm just getting started with Rails, and for my first project I want
to create a Rails app that is nothing more that a SOAP web service.
From what I have been able to figure out it looks like with Rails 2
there was a web services framework of some sort. I have been
struggling to find anything on Rails 3. Oh yea, yes it has to be
SOAP :slight_smile: , we have SOAP clients and apps already and we have no plans
to move to anything else, for now.

Is there a good article or something on getting started with this?

This is just my own opinion, but if all you want from Rails is to
provide a SOAP web service then choose something other that Rails. I'm
very much a fan of Rails, but I think you'll have an uphill battle.
Rails is very opinionated against SOAP, as am I.

Agreed that SOAP is less convenient that REST, but why do you think
Rails can't provide it well?

I'd say, do yourself a favor and either use Rails as it is intended,
which is to provide web services through REST. Or find a framework you
won't have to fight against every step of the way.

What would have to be fought against? This doesn't appear to make
sense.

Best,

Marnen Laibow-Koser wrote in post #969564:

Agreed that SOAP is less convenient that REST, but why do you think
Rails can't provide it well?

I'm just saying that if SOAP is the only thing the app is doing, why not
use a framework that has SOAP support built-in.

I'd say, do yourself a favor and either use Rails as it is intended,
which is to provide web services through REST. Or find a framework you
won't have to fight against every step of the way.

What would have to be fought against? This doesn't appear to make
sense.

I'll reiterate that this is my opinion. This will remain my opinion
until someone can point to a plugin/gem that proves that SOAP is easy
and robust with Rails. I'll concede my opinion if someone can do that.

There are other frameworks that have more robust SOAP support built-in.
Obviously, since Rails provides no built-in support for it. So if that's
the only deciding factor in choosing a framework, why choose one that is
inherently opposed to your apps needs?

I'm not at all saying that it is impossible to provide SOAP services
with Rails.

Besides my experience with SOAP has never been a pleasant one. My
opinion is already stacked heavily against it.

Thanks, it's not the answer I was looking for but I can accept it.

Charlie

For what it's worth, I have also had a MISERABLE time with SOAP in ruby. For one of my projects that required the SOAP convention, I ended up just plugging in a python library which worked brilliantly.

If you're really set on ruby, you can try Savon or soap4r, but I've found it can be difficult to customize headers, etc.

Good luck!