Thursday, October 29, 2009

WCF 3.5, REST vs Soap

Starting with WCF 3.5 services can be rest enabled. MEaning you can either create services with SOAP or REST Extensions.
Few key constraints for this descision,
(1) SOAP requires knowledge of XML standards on the other hand Any client or Server application with HTTP support can make call to REST Services with HTTP Get verb.
(2) SOAP Requires XML packet across every Request/Response, where as REST Services does not have this constraint. this can make the SOAP services 10-15 times more heavy on Wire. this is one reason for utilizing the REST Services on low or limited profile mobile.
(3) SOAP operates on Heavy metada, this makes them very useful while designing Services which requires the formal contract to be established for describing the interface that the web service offers. REST on the other hand does not publish any Metadata.