简体   繁体   English

如何生成WCF服务的完整WSDL?

[英]how to generate complete WSDL of a WCF service?

I have a wcf service that is being hosted as http://localhost:123/Service.svc If I generate the wsdl using svc path?wsdl the wsdl gets displayed but that contains only the wsdl:binding part which are the exposed operations. 我有一个托管为http://localhost:123/Service.svc的wcf服务,如果我使用svc path?wsdl生成了wsdl,则会显示wsdl,但其中仅包含wsdl:binding部分,这是公开的操作。

Although that is enough to generate the proxy class but is there any way to get the complete wsdl which has all the metadeta like wsdl:types, xs:schema , wsdl:message , wsdl:portType 虽然这足以生成代理类,但是有什么方法可以获取完整的wsdl,该wsdl具有像wsdl:types,xs:schema,wsdl:message,wsdl:portType等所有元数据

With .NET 4.5 a new feature was implemented in WCF - Flat WSDL. 使用.NET 4.5,在WCF-Flat WSDL中实现了一项新功能。 You can find more information here . 您可以在此处找到更多信息。

In earlier versions of .NET the WSDL contained as you said only wsdl:bindings and references to (another url) schemas etc. That was changed in .NET 4.5 although the original functionality is still available. 正如您所说,在.NET的早期版本中,WSDL仅包含wsdl:bindings和对(另一个URL)模式的引用等。在.NET 4.5中已进行了更改,尽管原始功能仍然可用。 Single wsdl is accessible with svc path?singleWsdl parameter in url. 单个wsdl可通过url中的svc path?singleWsdl参数进行访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM