Converting SOAP to REST |
Don’t let the image fool you. It doesn’t mean that SOAP is Superman and that REST is asleep under a tree. |
So, this post is about converting to a RESTful approach, for reasons previously discussed. We will convert the same project that is SOAP-based. |
A Comparison from the previous blog post
|
Steps to take and why |
|
Step 1 – Add service reference |
Right click on https://localhost/WCFService
|
Step 2 – Add WebGet attribute |
Description: The IService Interface decorated with [WebGet]
|
Step 3 – Add WebHostFactory to Service.svc |
Step 4 – Eliminate <service.ServiceModel> from Web.config |
Description: The updated Web.config file
|
Step 5 – Go into Internet Explorer and Test |
Comments
Anonymous
December 15, 2010
You don't convert SOAP to REST like this. They are two different architectural styles and result in two completely different APIs. You converted SOAP to POX, which is just doing the same thing as SOAP without the envelope.Anonymous
December 15, 2010
Hi Jesse, Thank you for reading my post. If you read my previous post, you will note that I make it abundantly clear that comparing SOAP vesus REST is like "apples versus oranges." To your point, SOAP is not an architectural style, but a protocol. - also stated in the previous post. Finally, feel free to write a more robust response that I could post inside my post. I'd be happy to incorporate your feedback. I appreicate the feedback. Bruno - bterkaly@microsoft.com