Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET By Dhananjay Katre, Prashant Halari, Narayana Rao Surapaneni, Manu Gupta, Meghana Deshpande
Table of Contents
Chapter 11. Exposing Legacy Components as Web Services
Web services are building blocks for moving the concept of distributed computing over to the Internet. Web services use SOAP as the communications protocol. SOAP is a specification that defines XML format for messages. Web services are described using WSDL. SOAP messages are generally created using toolkits. In this chapter we have seen how the SOAP ToolKit takes a COM DLL as input and creates the requisite WSDL and WSML files along with the specified listener.
The WSDL file can be used to initialize the SOAPClient to access the Web service methods . The SOAPClient can be used in traditional clients such as Visual Basic or ASP and also .NET clients such as ASP.NET.
The wsdl.exe is used to create a proxy class from the WSDL file. This proxy class is compiled into an assembly and placed in the /bin directory so that the Web service can be accessed.
Using Visual Studio .NET, creating Web services is very easy. To consume the service, we just have to add the service as a Web reference to the client application. The proxy is automatically created, and we can then directly access methods of the Web service through the proxy.