1

It seems that there are two methods for auto generating web service proxies in VS2008 from a wsdl.

  • wsdl.exe
  • Adding a web reference/service reference from the interface

I've been using wsdl.exe because I like having access to the class - and when I add a reference, I haven't been able to find the generated proxy code. Is there a benefit of just adding a reference that I may be overlooking?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
NandVoid
  • 75
  • 1
  • 6
  • 1
    1) You should be using a Service Reference, not a Web Reference, and 2) Use the Object Browser to find out where your types went, and 3) Click the Solution, then click the "Show all Files" toolbar button, and expand the web/service reference until you find the Reference.cs/Reference.vb file. – John Saunders Feb 01 '11 at 20:43
  • Thanks John. If you drop this comment into an answer, i'd be happy to accept it and bring closure to this question. – NandVoid Feb 10 '11 at 18:51

1 Answers1

1

Adding a service reference is the way to go. As pointed out to me on another thread, it is prudent that I strongly encourage you to avoid using wsdl.exe unless you have a very good reason to be using it. For your reference, the VS option Add Web Reference is a wrapper over wsdl.exe and creates proxies for .NET 1.1 or 2.0 clients. Add Service Reference is a wrapper over svcutil.exe and is used to create .NET 3.0+ clients.

xelco52
  • 5,257
  • 4
  • 40
  • 56