Wednesday, December 19, 2007

Creating and Consuming .NET Web Services in 5 Easy Steps

The Internet has a new player on the scene. It’s been surrounded by a great deal of hype -- and even some television commercials! Apparently, this new, "next generation technology" will change the way business is done on the Web. It seems that soon, companies, their applications or software, and any Internet-enabled devices will easily be able to communicate with, and provide services to, one another regardless of platform or language. Sounds revolutionary!
So, what exactly is it that will open these boundless lines of communication? Web Services, that's what!
Web services give developers the ability to utilize four open Web standards:

HTTP -
Hypertext Transfer ProtocolThe standard protocol used over Port 80, which traverses firewalls, and is responsible for requesting and transmitting data over the Internet.
SOAP - Simple Object Access Protocol An XML-inherent protocol that encloses a set of rules for data description and process. As a standard, this is the center-piece that complements the other three standards mentioned here.
XML - Extensible Markup LanguageThe most common markup language in which all this information is written.

WSDL - Web Services Description LanguageAn XML-based method used to identify Web Services and their access at runtime. .NET provides a tool called WSDL.exe, which essentially makes it quite easy to generate an XML Web service as an XML file. This contains all the methods and instructions the Web Service has, and typically uses SOAP as its default.
This article will see you create and consume a data-driven .NET XML Web service in 5 quick and easy steps!
I’ll assume that you have a decent grasp of common .NET data access, Web server controls, such a datagrid, and some object-oriented programming concepts. If not, don't worry too much. If you complete the examples, and view the results, you should have no difficulty in keeping up and observing the causes and effects of what this tutorial entails.
Prior to .NET, there were other alternatives that could be used to access a Web service, such as Microsoft's MSXML component, which enabled you to communicate with the given Web Service over HTTP POST. However, this process, while acceptable, is just not .NET.
Ok, let’s begin!

No comments: