tags:

views:

24

answers:

3

Hello,

I have two dumb/rookie questions. My problem is, I have NO idea where to begin learning this stuff.

Traditionally, I am an ASP.NET developer. I am familiar with creating and consuming traditional web services (.asmx) in ASP.NET. Now, I want to create some REST based services that adhere to the HTTP verbs approach. I intend to use WCF services to accomplish this. In addition, I want to create my services like Twitter in a fashion where the caller can reference [serviceName].[xml|json]. Unfortunately, i do not know how to allow the caller to specific the format. It seems like I need to create two seperate services which seems odd. Am I way off? Can someone point me in the right direction?

Thank you!

+1  A: 

Check this tutorial. It will show you how to create REST service in WCF. Part 4 of the tutorial will also show you how to create REST service which is able to return both JSON and XML response. Be aware that this is for .NET 4.0 which added a lot of features to REST API (including automatic response type).

Ladislav Mrnka
A: 

Juval Lowy's 2nd edition on Programming WCF is available. This should be an excellent source; his first book was outstanding. Michele Leroux Bustamante is another excellent author on WCF, but her 2nd edition book isn't due for another few months, so go with Juval Lowy.

Essentially, WCF separates protocol (binding) from code, so you should be able to write the service once, and use multiple end points (address, binding, etc.) to provide different formats.

Cylon Cat
Yes those books are excelent but neither of them covers REST services.
Ladislav Mrnka
A: 

The Programming WCF book has a 3rd edition out now.

Castielle