Deploy a web service in IIS?

I started learning web services. I found out about web services, UDDI, WSDL, SOAP, etc. And the web services architecture. Visual Studio successfully starts the service on the local system.

Then I deployed the entire folder of this web service to Iro wwwroot and tested it. It works successfully.

But when I delete another file from the wwwroot \ webService1 folder (I left only the service1.asmx and bin folders), then the service also works.

Here I see that only two .asmx files are used to administer the web service, and the other is webService.dll in the bin folder.

I can't figure out where SOAP, WSDL, namespace, or other things are needed to start the web service.

Please clarify.

+4
source share
4 answers

SOAP, WSDL, namespace are handled by IIS and ASP.NET. In your scenario, the endpoint of your web service is your asmx file (there is no .cs file in your deployment), and the DLL in the bin folder contains the code you wrote for your web service (so that it does something).

If you call your web service in a web browser, you should see that your web methods are listed for testing. IIS knows how to process * .asmx files for this. If you click one, you will see a sample shape (if input parameters are expected) and a button. Again, IIS knows how to help you. When you click the button, IIS and ASP.NET process the SOAP request, process it using your code, and return a SOAP response.

If you create a β€œtest” project in Visual Studio and specify a link to a web service that points to a deployed web service, Visual Studio will create a proxy class and extract another code from it that opens this service. Give it a try. You should get at least: WSDL, which defines your web service, a file called reference.cs, which contains code that makes a heavy lifting call to your web service (SOAP request from your application and unSOAPing from the response).

If you download a tool called Fiddler, you can intercept and verify the SOAP call to the web service.

For more information, see Web Services with ASP.NET .

+6
source

There are no such β€œfiles” at all. The asmx and dll files contain all the code for the service. You can see some of them in the URLs that are requested for SOAP / WSDL information.

+3
source

I believe that if you add WSDL after .asmx, you will see the definitions. For example, this example:

WSDL example

+3
source

I think these are protocols and require nothing. IIS and requesting applications understand these protocols.

+2
source

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


All Articles