Create a Single WSDL File for WCF Services in .NET 4.5

One of the things that I’ve always found to be annoying is that WSDL files generated for WCF services that reference objects in different namespaces include wsdl:import links to other WSDLs. This separation by namespace may make sense from an organizational/maintainability standpoint, but it makes it difficult to provide a WSDL for a privately hosted service to a third party consumer doing external development.

I was excited to learn that .NET 4.5 has an option to generate WSDLs as a single file–what a great idea! It’s easy to do, too. All you do is append ?singlewsdl to your service instead of the standard ?wsdl. When you do this, all of the types from the various namespaces that might be in-use are included in a single file. It’s wonderful!

Read more about this and other new enhancements to WCF in .NET 4.5 here.

Advertisements

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s