These days, I have spent most of my work with Microsoft technologies, so naturally I check what WCF has to offer. It seems like a very flexible and great addition to removing .Net, but it seems to be very attached to SOAP messages and quite awkward for the platform's agnostic web service application. I am not a specialist in this technology, but I believe that all the flexibility they advertise means you can tear yourself away from SOAP messages and return any data structures and format. Is this true or false?
The reason I'm talking is because if I really wanted to create the application as a REST service, one of my target platforms would be mobile. Not only one important goal of any web service is to preserve the payload of data, whether itβs mobile at dialing speed or a full desktop application.
So, if you take the Twitter api as an example, it was incredibly successful because you can request data as JSON without any fancy SOAP envelopes weighing the data and receiving the least number of bytes to represent the required data. Thus, a mobile application running on a poorly connected device that uses Twitter data can use minimal bandwidth. In addition, the Twitter, Facebook template, or any of the more successful public api is a custom data structure in JSON and / or XML and not wrapped in a SOAP envelope (although I could be wrong ... this is just my impression).
How do you do this in WCF? Do you need to jump over hoops to tell WCF "just return this text ... don't worry about a SOAP envelope", or is this a simple configuration option?
source share