Forum: Ruby on Rails Web Service: REST or SOAP?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Xdmx X. (Guest)
on 2009-03-11 15:54
Hi, i've a rails app and i'd like to add a web service to permit of get
data from external.
What should i use to do this? I've seen that for create a web service
there is rest and soap, which is better?
I'm already using rest for the normal using of the web app, should i
stay stick with it?
I know that with soap exist wsdl and other stuff, what should i need for
rest?
Do you have any link that expain better this? i've googled, but a lot of
stuff are useless :(
thank you
Sumanth K. (Guest)
on 2009-03-11 16:34
(Received via mailing list)
Hi,
Refer to the links, they are straight forward and gives you reasons to
make
a choice based on your requirements.

http://www.ibm.com/developerworks/opensource/libra...
http://www.datanoise.com/articles/2008/7/2/actionw...



On Wed, Mar 11, 2009 at 3:54 PM, Xdmx X.
<removed_email_address@domain.invalid
> wrote:

> stuff are useless :(
> thank you
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


--
--
Thanks & Regards,
Sumanth Krishna. A
+358 40 3276564

Blogs:
                        TwinclingCommunity:

http://sumanthtechsavvy.blogspot.com/
         http://www.twincling.org/node/227

http://yourway2health.blogspot.com/
           http://www.osef.twincling.org
Sumanth K. (Guest)
on 2009-03-11 16:35
(Received via mailing list)
Hi,
  Refer to the links, they are straight forward and gives you reasons
to make a choice based on your requirements.

http://www.ibm.com/developerworks/opensource/libra...
http://www.datanoise.com/articles/2008/7/2/actionw...


On Mar 11, 3:54 pm, Xdmx X. <removed_email_address@domain.invalid>
Xdmx X. (Guest)
on 2009-03-11 16:53
Sumanth Krishna wrote:
> Hi,
>   Refer to the links, they are straight forward and gives you reasons
> to make a choice based on your requirements.
>
> http://www.ibm.com/developerworks/opensource/libra...
> http://www.datanoise.com/articles/2008/7/2/actionw...
>
>
> On Mar 11, 3:54�pm, Xdmx X. <removed_email_address@domain.invalid>

Thank you Sumanth, i think i'll go with rest, it seems easier and
lighter... do you know if wadl is needed? or is it possible to give just
the xml as response (as is doing with other requests)?

p.s. actually i don't know the requirements, i'm just looking on which
is the best practice to develop a web service :)
Robert W. (Guest)
on 2009-03-11 21:01
Xdmx X. wrote:
> Thank you Sumanth, i think i'll go with rest, it seems easier and
> lighter... do you know if wadl is needed? or is it possible to give just
> the xml as response (as is doing with other requests)?

I'm just going to say it, "You've made the correct decision with REST."
Just forget that you every heard the term SOAP and you'll live a much
happier life.

No you do not need a WSDL with REST. Just send the PO-XML, JSON, Atom,
RSS or whatever other "standard" response format that make sense for
your action. Also, be sure to take advantage of the HTTP response codes
to inform your consumers of any errors that may occur. Basically, all
the stuff you should already be doing with your Rails 2.x application.

My recommendation would be to take a look at some good existing REST
services such as those provided by applications like Lighthouse, Github,
Highrise, etc. If you can learn how to consume one of those, then it
should help in implementing your services.

http://lighthouseapp.com/api
http://github.com/guides/the-github-api
http://developer.37signals.com/highrise/

P.S. Obviously, this is a personal opinion, but it does follow the
opinion of Rails.
This topic is locked and can not be replied to.