获取元数据出来的WebHttpBinding端点 [英] Get metadata out of a webHttpBinding endpoint
问题描述
使用我的前面的问题一个参考,我想知道我怎么会提取客户端应用程序WCF服务的信息,知道的方法/类型暴露了什么,如果服务公开使用的WebHttpBinding只有一个终点?
With a reference to my previous question, I would like to know how would I extract information of a WCF service from a client application to know what methods/types are exposed if the service exposes only one endpoint that uses webHttpBinding?
刚总结一下,在我刚才的问题,我才知道,使用的WebHttpBinding端点没有得到生成的WSDL中暴露的,因为这将是一个JSON端点,是不兼容的。
Just to summarize, in my previous question, I came to know that an endpoint using webHttpBinding does not get exposed in the generated WSDL because it would be a JSON endpoint and is just not compatible.
推荐答案
的WebHttpBinding是有约束力的基于REST的 - REST做的不的公开的元数据像WSDL / XSD违背SOAP
WebHttpBinding is a REST-based binding - REST does not expose metadata like WSDL/XSD contrary to SOAP.
有没有办法在这个时候来提取一个REST端点的元数据。有正在进行一些努力来建立一个类似的结构为REST称为 WADL(Web应用程序描述语言) - 但远不尚未标准化。
There's no way to extract the metadata from a REST endpoint at this time. There are some efforts under way to establish a similar construct for REST called WADL (Web Application Description Language) - but that's nowhere near standardized yet.
目前,使用REST端点,您必须要么搞清楚自己,或者你需要有通过如服务供应商提供的一些文件一个静态的HTML页面或东西。
For now, with REST endpoints, you have to either figure it out yourself, or you need to have some documentation provided by the service provider on e.g. a static HTML page or something.
.NET 4中确实提供了一个自动生成的帮助页面一定程度的 - 看到的这个博客帖子或的MSDN文档获取更多信息。但它仍然远不及正式和机器可解释为WSDL / XSD。
.NET 4 does provide some level of an automatically generated help page - see this blog post or the MSDN docs for more info. But it's still nowhere near as formalized and machine-interpretable as WSDL/XSD.
这篇关于获取元数据出来的WebHttpBinding端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!