Search code examples
c#web-serviceswcfsoapwsdl

web service, service reference, command line wsdl creation


I have an app that uses .NET ASMX services to communicate. I have seen some developers use the wsdl command through the command line to generate strongly typed classes that didnt depend on an endpoint being in the web.config.

Why would some use the wsdl command line instead of using a service reference (right-click-> add service reference)? What would you do?


Solution

  • I suppose that the tecnique that you explain should be useful if you need to talk with an unknow WS, at design time.

    I do not see any other good reason to use it, as it provide great flexibility but that flexibility could easilly became pain (without a strict schema in you solution the risk is to introduce runtime errors, hard to find at design time)