WCF REST Service not visible in WCFTestClient

梦想的初衷 提交于 2019-11-29 03:24:23

It's because web endpoints (unlike SOAP ones) do not expose metadata, so the test client doesn't know about it when it downloads the WSDL for the service. Unlike SOAP, which has well-defined formats for exposing metadata (WSDL, MEX), web (a.k.a. REST) endpoints do not.

That's the short story. If you want to know more details, I wrote a blog post about it at http://blogs.msdn.com/b/carlosfigueira/archive/2012/03/26/mixing-add-service-reference-and-wcf-web-http-a-k-a-rest-endpoint-does-not-work.aspx

The following is a list of features not supported by WCF Test Client:

• Types: Stream, Message, XmlElement, XmlAttribute, XmlNode, types that implement the IXmlSerializableinterface, including the related XmlSchemaProviderAttribute attribute, and the XDocument and XElement types and the ADO.NET DataTable type.

• Duplex contract.

• Transaction.

• Security: CardSpace , Certificate, and Username/Password.

• Bindings: WSFederationbinding, any Context bindings and Https binding, WebHttpbinding (Json response message support).

Source: http://msdn.microsoft.com/en-us/library/bb552364.aspx

try adding the "mexHttpBinding" endpoint that exposes the metadata

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