Rants, rambles, news and notes from another geek

WSDL.EXE Useless?

Apparently a lot of people think so

Run the .NET Framework SDK’s WSDL.EXE against a WSDL file with the /server command line.


Simon Fell asks “what am I supposed to do with it?


Alas, the feature is practically useless as it sits today. Here are two options (short of the obvious “edit the generated sources as text”):


  1. _Write some CodeDOM code to munge the intermediate result into something you actually can use. You can do this by invoking the WSDL generation code programmatically and/or by writing a WSDL importer extension and looking for the use of server-mode. _
  2. _Combine #1 with the new C# partial classes feature that doesn’t ship until whidbey. _


I’ll ping __Yasser_ and _Tim_ to see if we have something laying around the shop._

It may be less than ideal, but the way I used it was to create the .cs file. Add it to my project, derive my ASMX code-behind file from the new class and (the bad part) re-add the [WebMethod] attributes. Sure, it would be better if I didn’t have to redo the attributes, but that is about all I had to do…

If Don finds any better tools that let us skip these extra steps, it would be nice, but honestly it wasn’t that much work.