views:

129

answers:

1

Why not just add http get support in config and that's done with the advantage that the service will be dual both SOAP AND REST?

What's all the buzz around rest ? What WCF will bring to this ?

I mean what's the difference from the viewpoint of a REST client application if I just set in my web.config for my asmx webservice to being able to accept get rest-like syntax

  <webServices>
    <protocols>
      <add name="HttpGet" />
    </protocols>
  </webServices>

and a WCF REST implementation http://geekswithblogs.net/.NETonMyMind/archive/2008/02/04/119291.aspx ?

seems nobody can really answer ... is it because it's hard or is it my question is stupid :)

Client only sees url (encapsulation principle) so why would I bother for more ? And what's the more that's still not clear :)

Other problem: if we switch to WCF, will we need to change url ? If yes that means all our hundred partners clients would be broken and I'll have to notify them of our change ?

+1  A: 

WCF is nothing to do with the REST. You can build your own REST services without using WCF & SOAP stuff.. Check out this sample REST service build in .Net 2.0

and Check out the excellent .Net open source REST implementation

To understand more about REST, read these

  1. http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
  2. http://en.wikipedia.org/wiki/Representational_State_Transfer
  3. http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming
  4. http://stackoverflow.com/questions/186631/rest-soap-endpoints-for-a-wcf-service
  5. http://stackoverflow.com/questions/2001773/understanding-rest-verbs-error-codes-and-authentication

To your comment:

if I have already an asmx webservice that can be converted to REST just in one line of configuration file ?

ASMX services are build upon SOAP, one more layer over HTTP. REST is simply a HTTP based, You can access(or call) your business resources the way you access the normal URLs. No more abstractions.

In REST, resources are identified by persistent identifiers(URLs).

For ex in products catalog system, by using asmx you create set of functions to add,update,delete products. like addProduct(),updateProduct, etc..

But in REST, you will be having single point of access, like http:\mysystem\prodcuts. To retrieve,add,update,delete products, you will be using respective HTTP verbs (GET,POST,PUT,DELETE) on the same URL.

So you cannot just convert asmx to REST, since both solves the problems in different way.

Cheers

Ramesh Vel
Hi thanks for the link but what's the interest to use yet another framework like wcf or the one you point to http://www.codeproject.com/KB/webservices/ReSTBasedServiceForCSharp.aspx if I have already an asmx webservice that can be converted to REST just in one line of configuration file ?
ASMX web services are now considered by Microsoft to be "legacy technology". That may or may not matter to you. More importantly, WCF is maybe 100 times more powerful that ASMX web services.
John Saunders
Ramesh thanks for updating your answer, but still from EXTERNAL user or client of the webservice I fail to see in your answer the difference in url syntax since it's also possible to use a normal get without using wsdl ?
@Saunders sure it matters to me but i FAIL to see what and my question was about the viewpoint of url syntax on client side which can be exactly the same as a rest webservice if one configure web.config to accept it.
@user: if you think that the term "REST" only refers to the URL format, then you are correct. However, since "REST" means a lot more than just the URL format, you are completely mistaken.
John Saunders
Client only sees url (encapsulation principle) so why would I bother for more ? And what's the more that's still not clear :)