Here we go. Dave couldn't wait as many others, too ... and Microsoft obviously did not have enough time for adding a nice little feature to their prime IDE. So I had fun spending my time with getting to know the beloved and still COM-based extensibility model of Visual Studio .NET.
I am pleased to announce the very first and very rough version of a Visual Studio .NET Add-In called 'WsContractFirst'. Yeah, a lot of people will rant that it is just the GUI-fied version of wsdl.exe - well, no. It is a complete new write-up, I am not leveraging wsdl.exe through the command line but use the .NET framework classes directly. So the code is completely extensible, sometime later I will eventually publish the code and might turn the whole thing into a GotDotNetWorkspaces project.
So what does it do, dude?
Ever wanted to simply right-click on a WSDL file in Visual Studio .NET and generate code from that Web service contract? Now you can - whether it be a client-side proxy class or a server-side stub skeleton: you choose. The Add-In automatically determines the project's programming language and accordingly generates source code (currently C# and VB.NET supported). The tool's functionality can also be reached through a common menu item entry in VS.NET's Tools menu.
Hopefully the Add-In handles the import of external schemas and WSDLs better than wsdl.exe. The code that makes the Add-In breathe is based on snippets of my formerly released DynWSLib to dynamically call Web services at runtime without 'any' knowledge of the WSDL beforehand (well, yes: this is somehow contradictory to the 'Contract First' approach. But it is actually useful in some verly limited uses cases such as testing. Actually the lib is used in a client side service invocation factory in a .NET-based Grid computing project). BTW, it would be nice if the server-side stub code would not produce an abstract class, but an interface instead - just what Indigo is capable of, as Don showed at PDC.
This is the second step in my and other's vision of first designing the Web services contract (and policy!) and then generating code skeletons from that. Hm, maybe there are some guys out there who can help me with the first step of visually designing the contract ... Chris, please come back to me!?
TODO: - testing, testing, testing (can need your help here) - adding desired features from users (well, need your help here, too :-)) - make it more sexy ...?
Feel free to leave any comments, flames, or rants here or there. Special thanks for testing, ideas, comments, and testing go to Tomas, Pierre, Christoph, and Ralf. Thanks guys.
DISCLAIMER: The sample is provided as is. Be sure that it is actually only a sample and does not in any sense conform to any coding guidelines and has not been proven to be a stable product! The code has not been reviewed by third parties or even been refactored for optimization - be sure that it is still much improvable. The author cannot be made responsible for any damage or inconveniencies but is willed to accept any questions and comments to this sample. Please notice that this code is only a technology demo and should not be included unedited into any serious project. The code is not documented.