Last post Sep 02, 2014 08:28 AM by AidyF
Aug 11, 2014 05:36 AM|developer6603|LINK
There's a lot of client code out on the web that shows how to consume a WCF Data Service when the metadata (i.e. entities, columns) are known beforehand. But I have a doubt that since WCF data service is a REST service, how the metadata is available here?(REST
service shouldn't have metadata)
Another question without knowing the metadata how can we consume a WCF data service. Is there any way?
Aug 14, 2014 11:40 AM|Fuxiang Zhang - MSFT|LINK
Wcf metadata is used to describe the service address, binding and contract. It contains the xsd and wsdl document.
With the metadata, client can know how to call the service. It's mainly goal is complete communcation cross platform.
WCF service metadata fits for the soap message protocol.
As for the restful service, it based on the web http protocol and the message format is the pure xml or json. The transfor
protocol and data format is fixed. Tnus, we need not use the metadata to description rest service.
Aug 18, 2014 03:46 AM|developer6603|LINK
Thanks a lot for your reply. But it didn't answer my question. My question was why WCF data service contain metadata though it is a REST service. As you rightly said "we need not use the metadata to description rest service" -- > But here the WCF
data services uses meta data. I was asking the reason.
Aug 18, 2014 04:00 AM|AidyF|LINK
The trick you're missing is that WCF isn't restful. It is a communications framework, not a REST web api. Implementing a RESTful service is one of the many things it can be configured to do, but it's not intrinsically RESTful. For most
service types you'll need the meta data as you have described.
Aug 18, 2014 08:03 AM|developer6603|LINK
Thanks for the reply. Yes I too agree that WCF is not about REST. In fact WCF is created with the intention of supporting SOAP services and it has added support to REST as well. But my doubt is WCF data services are mentioned like REST services, and REST
service shouldn't have meta data (that's what it was mentioning). Then why WCF data services need meta data?
"This enables you to access and change data by using the semantics of representational state transfer (REST)"
Aug 18, 2014 08:08 AM|AidyF|LINK
WCF Data Services is just a type of service that WCF can support, but one of many. If you are using WCF Data Services then your service is restful and won't need any meta data. However just because WCF Data Services supports this concept doesn't mean that
all services and all binding types do.
Aug 20, 2014 04:41 AM|developer6603|LINK
"If you are using WCF Data Services then your service is restful and won't need any meta data" --- > But WCF data services needs meta data. That's where I was confused and curious to know the reason.
Sep 02, 2014 06:50 AM|developer6603|LINK
Any thought ?
Sep 02, 2014 08:28 AM|AidyF|LINK
It doesn't need meta data for a REST service.