Rants, rambles, news and notes from another geek

Implementing Another's WSDL Interface

Today I ran across something I’d never had to do before. I had a WSDL file that I had to implement in my own webservice project. By reading the WSDL, I was pretty sure that I could create it by hand, but I was worried about whether it would really be the same thing or not.

I figured that there&nbsp_place_holder;had to be a way to do this in .NET and of course there is. The WSDL.EXE tool has an option that will create an abstract base class for a given WSDL. If you need to use this, it is simple:

C:\> wsdl.exe /server MyService.wsdl

This example will produce a .cs file called MyService.cs that contains an abstract class called MyService that has abstract methods for each method defined in the WSDL file. Nice stuff.