Web Service: REST or SOAP?

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 :frowning:
thank you

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/library/os-ws-rubyrails/index.html

On Wed, Mar 11, 2009 at 3:54 PM, Xdmx X.
<[email protected]

wrote:

stuff are useless :frowning:
thank you

Posted via http://www.ruby-forum.com/.

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

Blogs:
TwinclingCommunity:

http://www.twincling.org/node/227

http://yourway2health.blogspot.com/
http://www.osef.twincling.org

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/library/os-ws-rubyrails/index.html

On Mar 11, 3:54 pm, Xdmx X. [email protected]

Sumanth Krishna wrote:

Hi,
Refer to the links, they are straight forward and gives you reasons
to make a choice based on your requirements.

IBM Developer
DATANOISE.COM

On Mar 11, 3:54�pm, Xdmx X. [email protected]

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 :slight_smile:

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

P.S. Obviously, this is a personal opinion, but it does follow the
opinion of Rails.