Introduction
XML (eXtensible Markup Language) came into existence after several years of HTTP/HTML revolution. If I brief few important features of XML, XML is a simple and easy-to-understand format for data markup. From this single, easy manner of data encoding, it wasn't too large a step to create a new application framework that combined HTTP and XML into Web service-and enabled developers to create distributed applications in ways that were impossible before. Defining a web service is a difficult task. But in brief we can define web service as application logic that is accessible using Internet standards. Or this is a secure and reliable service provided over the internet or intranet. The extension for asp.net web service file is .asmx.
WSDL (Web Services Description Language)
WSDL can be defined as a language (document) which describes a web service. Hence one more definition of the web service can be given as anything a Web Services Description Language (WSDL) document can describe. The Web Services Description Language tool (WSDL.exe) generates code for XML Web services and XML Web service clients from WSDL contract files, XSD schemas, and .discomap discovery documents. Open Visual studio.Net command prompt and type WSDL /? To get list of options available with this tool.
Below command generates .wsdl file for a web service located in specified URL.
Wsdl http://localhost/MyServices/ArithmeticService.asmx?wsdl
Two major features in .NET are its ability to create XML Web Services Servers and XML Web Services Clients. There are also several related APIs (application programming interfaces) available for manipulating DISCO (Web Services Discovery Language) and WSDL (Web Services Description Language) documents.
The engine that drives most of these features is XML Serialization. This API, found within the System.Xml.Serialization namespace, provides the ability to read and write XML without a DOM (Document Object Model) class or an XML-based stream reader. Instead, classes can be mapped to schema-based XML using a default set of rules, plus a variety of optional attributes to customize this serialization.
DISCO (Universal Description, Discovery, and Integration): This is a platform independent framework which acts like dictionary of the web services and helps to locate web services on the internet. This also provides description for the web service that we are searching for.
Proxy
For XML Web service clients, the proxy class handles the work of mapping parameters to XML elements and then sending the SOAP message over the network (to and fro). By default, the proxy class uses SOAP over HTTP to communicate with the XML Web service. But this can be changed by using WSDL.exe to use either the HTTP-GET protocol or HTTP-POST protocol.
Let's create a Web Service and consume it by the client application. This service returns Maximum of the two numbers sent.
Create a Service
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.
Gowtham RajamanickamPosted Apr 25, 2015, 6:34 AM
good