views:

231

answers:

1

My standard WCF/ RESTful service is going to return big complex object. In WCF as and when someone adds the service reference it creates a proxy of it, i.e. I am exposing data contract to client and its strongly typed at the client level.

How are we going to do with RESTful service, is there anyway to the same for RESTful service.

A: 

One of the benefits of RESTful services is that they are lightweight. That implies no infrastructure like WSDL files, proxies, etc.

RESTful services are not self-describing, so you don't have to worry about providing a WSDL file; maintaining all the schemas online, etc.


If the payload is complex, then why are you using REST? Just because it's a fad? Do the operations on your service correspond to HTTP operations on "resources" as the HTTP Protocol specification defines it?

If not, then don't use REST.

John Saunders
how to maintain the schemas then? So my client will not be having strongly typed classes which were there in WCF.
Miral
Don't worry about your client. It's a REST service - the client is on his own. Just document it properly.
John Saunders