WSSF for RESTful Web Services?

Topics: Service Factory Modeling Edition Forum
Apr 20, 2009 at 7:25 PM
Can WSSF help create RESTful services? Has anybody here done that? I'd appreciated it if you could provide some pointers. Thanks.
Developer
Apr 20, 2009 at 11:09 PM
Out of the box WSSF will not create RESTful services. However making the required changes should be fairly easy because you basically need to update the .tt files for the service contract and simply add the required attributes to the operations.
Here you can find the REST pattern description:

http://www.codeplex.com/AppArch/Wiki/View.aspx?title=App%20Pattern%20-%20Two-Tier%20Service%20Application%20Scenario%20(REST)&referringTitle=Application%20Patterns
May 5, 2009 at 12:28 PM
Has anyone managed to get this working? I've read the attached atricle, but have no idea how to actually implement this. Read something about modifying the .tt file, but how would it know whether an operation is a Get or Post, etc?
Developer
May 5, 2009 at 9:23 PM
In fact you need first ot define in advance which operarions you will desing as "Get" and "Post" and after that you can decorate the specified web methods (operaations) with these attributes. You can do this updating the servicecontract.tt file for WCF located in the ServiceContract DSL project.
You can find more samples on how to update these files in the Hands-on labs home page.
Jun 17, 2009 at 9:29 AM
Edited Jun 17, 2009 at 10:08 AM

Plural sight have created a library to call RESTful services.  it is available on MSDN, sorry I don't have a link.  There is also a good video article illustrating how easy it is to use. To be honest I think the code is here on codeplex anyway.

There are also quite a few good articles in Service Station illustrating how to do it.

Developer
Jun 17, 2009 at 12:03 PM

Here you have some guidelines in MSDN: http://msdn.microsoft.com/en-us/library/dd203052.aspx

And the videos and links from Plural sight samples: http://www.pluralsight.com/main/screencasts/screencast.aspx?id=calling-restful-services