Error: Cannot obtain Metadata; using WCF Test client, C#, and trying to implement webhttpbinding and json

£可爱£侵袭症+ 提交于 2019-12-06 02:56:07
bruno.bologna

Take a look at this link

It states the following:

WebHttpBinding is a REST-based binding - REST does not expose metadata like WSDL/XSD contrary to SOAP.

user717236

In addition to bruno bologna's answer and link, the link at WCF REST Service not visible in WCFTestClient also provides some very useful information. Basically, the reason why it's not working is the WCFTestClient is not designed for web (think JSON). It hooks in through SOAP. If I have a service that is dependent on JSON, I cannot test it through the WCFTestClient.

I see that it is possible to modify the client configuration file in WCFTestClient to enable web binding, but that may be because of future-proofing for WADL or if someone writes a WADL service extension. That's just specultation on my part, though. Otherwise, it doesn't appear one can test WCF Service with JSON using the WCFTestClient tool.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!