开发者

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 an开发者_运维知识库d 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.


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.


There are no such 'files' at all. The asmx and dll files contain all of the code for the service. You can see some of that in the URLs that are requested for the SOAP/WSDL info.


I believe if you append ?WSDL after .asmx you will see the definitions. Such as this example:

WSDL Example


I think these are protocols and does not require anything. IIS and the requesting applications understand these protocols.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜