Monday, 2 June 2008

Integrating REST POX web services and .NET WCF


WCF 3.5 supports REST POX services using the web service model.

WebHttpBinding supports cookies for session support etc, e.g:

WebHttpBinding webHttpBinding = new WebHttpBinding();
webHttpBinding.AllowCookies = true;

using (ChannelFactory cf = new ChannelFactory(webHttpBinding, hostPath))
{ ...


  • WebInvoke method POST: post data sent only as JSON or XML - no support for simple form encoded parameters.
  • General inflexibility when mixing types of data or overloading services make it harder to leverage existing services that support existing AJAX/rich Internet systems.

Blogs, articles and useful resources:

HTTP Programming with WCF and the .NET Framework 3.5 -

Rick Strahl's excellent articles:

How to consume REST services with WCF -

Simple example with DataContract:

A set of WCF tutorials:

Interesting problem with XML serialiser quota that you could run into at some point:

No comments: