What is the use of the / serverInterface and / server options for the WSDL.exe tool

All, Generally.With the WSDL.exe tool for the asp.net tool, I think there are three ways to generate asp.net code from the wsdl file.

  • default output for creating a client proxy class.
  • generate abstract class code. (add /server option)
  • create interface code. (add /serverInterface )

In my understanding, 1 generates a client proxy class that can help handle request and response for or from web services for the client side.

As for 2 and 3, I believe that they are really used to generate code for the server side, when you want to implement your own web services from a generated abstract class or interface.

But I'm not sure if I understand correctly. hope someone who is familiar with him can help check him out. If not, please correct me .thanks.

+4
source share
1 answer

First, as John already said, use WCF if possible.

You are correct, however, /server and /serverinterface are used to generate code for server components when you have an existing WSDL document for a web service.

Although for many ASP.Net developers, the first implementation of a web service is used to create WSDL, maybe you have an existing WSDL document for a web service that you need to implement in ASP.Net, for example, an outdated web service that migrates to the new platform . In this case, these two switches are used to create a web service that is compatible with the existing WSDL so that clients can use the ASP.Net web service without having to reuse the WSDL (which often requires changing the code in this client).

I myself used this function before creating the stub web services for testing purposes, when I have the WSDL for the web service, however it is not possible to verify the actual implementation of the web service.

+1
source

Source: https://habr.com/ru/post/1479688/


All Articles