Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Service deployment in IIS?

I started learning web services. I learnt about web services, UDDI, WSDL, SOAP etc. and architecture of web services. Visual Studio is running the service in local system successfully.

Then I deployed the entire folder of that web service in IIS wwwroot, and tested. Its running successfully.

But when I remove the other file from the wwwroot\webService1 folder (I left only service1.asmx and bin folder) then also service is running.

Here I see that only two file are used in ruuning the webservice one is .asmx and another one is webService.dll in bin folder.

I'm not able to understand where is SOAP, WSDL, namespace or other things, that are required to run web service.

Please clarify.

like image 481
PawanS Avatar asked Dec 09 '22 11:12

PawanS


1 Answers

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

If you call up your webservice in a web browser, you should see your web methods listed out to test. IIS knows how to process *.asmx files to do this. If you click on one, you should see a sample form (if input parameters are expected) and a button. Again, IIS knows how to serve this out to you. When you click the button, IIS and ASP.NET handle the work of SOAPing your request, handling it with your code, and SOAPing the response back to you.

If you create a "test" project in Visual Studio, and set a web service reference that points to your deployed web service, Visual Studio will create a proxy class and pull in some additional code from it's discovery of the service. Try it. You should get at least: a WSDL which defines your web service, a file called reference.cs which contains the code that does the heavy lifting of calling your webservice (SOAPing the request from your application and unSOAPing from the response).

If you download a tool called Fiddler, you should be able to intercept and inspect the SOAP call to your web service.

Take a look at Web Services with ASP.NET for additional information.

like image 145
DashTechnical Avatar answered Dec 30 '22 05:12

DashTechnical