简体   繁体   中英

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.

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

With .NET 4.5 a new feature was implemented in 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. Single wsdl is accessible with svc path?singleWsdl parameter in url.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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