What’s new in WCF 4.5? a single WSDL file
This is the second post in the WCF 4.5 series, and this time we’ll talk about WSDL files.
Previous posts:
1. What’s new in WCF 4.5? let’s start with WCF configuration
A few weeks ago, I posted about the difference between exposing the service metadata through WSDL and through a MEX endpoint. One of the things I noted in the post was that the metadata exposed through a WSDL file is actually one part of the overall metadata – in addition to the WSDL file, there is usually an additional set of files, XSD files, that contain the data contracts of the service. For WCF 4 and previous versions, the schema part in the WSDL is a set of import directives for additional files:

So what has changed in WCF 4.5? When you browse to a WCF 4.5 service’s metadata URL, you will see the following WSDL options:

In addition to the ?wsdl option, we now get another option - ?singleWsdl. The singleWsdl link will return a single WSDL file, containing all the schemas in it:

Each of the schema elements contains the schema that was previously imported from an external file.
So in my previous post, where I listed the reasons why to use MEX instead of WSDL, we can omit the first reason – “If you want to make as less calls as possible to your service in order to get its metadata (one call instead of several).”
Stay tuned for more posts about the new features of WCF 4.5. You can also follow me on Twitter (@IdoFlatow) to get updates as soon as new posts are published.
The RTM of .NET 4.5 is still to come, and I assume many of you are still adjusting to WCF 4. If you want to learn more about the new features of WCF 4, come to my session at Visual Studio Live! 2011 in Redmond (October 17-21).
Also, if you are an MCT and reside in the US, come hear my session about WCF 4 at the MCT 2011 North-America Summit that will be held in San-Francisco (October 19-21).