Building XML Web Services Using C# and ASP.NET

What is a web service?

The term "web service" refers to a form of a component that can be used remotely. Microsoft offers two types of web services in their .NET framework: XML web services and .NET remoting. When developers refer to web services they usually mean XML web services, and in this article I will also refer to XML web services as just web services.

Web services are invoked remotely using SOAP or HTTP-GET and HTTP-POST protocols. Web services are based on XML and return an "answer" to the client in XML format. Web services have all the advantages of components plus many more. The most significant benefits include:

  • Language and platform independence: Web services can be built and consumed on any operating system just as long as that operating system supports the SOAP protocol and XML.
  • Automatic upgrade: Unlike components, if a web service requires an update, that update is propagated to all applications consuming that web service immediately. This is because the actual methods and properties for the web service are invoked from the web server remotely, meaning that each function contained within a web service appears as a "black box" to a client: they aren't concerned with the way the function does its job, just as long as it returns the expected result.
Commonly Used Jargon
As with all new technologies, web services come with a lot of associated jargon. Here's a list of some terms that you'll come across as you begin your journey down the web services highway:

UDDI
Well, this isn't the case at the moment, but I'm pretty sure that in the future there will be thousands of web services on the Internet. The question is how are we going to find the web services we are looking for? UDDI (Universal Description, Discovery and Integration) is the answer to that question. UDDI is a registry that provides a place for a company to register its business and the services that it offers. People or businesses that need a service can use this registry to find a business that provides the service.

When you search for a web service using UDDI's web service or web browser, UDDI returns a listing of web services that matched your criteria. This list is returned in the form of a DISCO or WSDL document.

WSDL
WSDL (Web Services Description Language) is a language that describes a web service. It contains information such as where you can find the web service, methods and properties that it supports, its data types, and the protocol used to communicate with the web service. WSDL is based on the XML format and it's used to create proxy objects. Basically, without a WSDL document, developers wouldn't be able to use web services simply because they wouldn't know which methods and properties they support and also which communication method any particular web service supports.

DISCO
DISCO (Abbreviated from discovery) is a list of WSDL documents. DISCO is used to group common web services together. DISCO documents are also in XML format.

SOAP
SOAP (Simple Object Access Protocol) is a protocol to transport data to and from the web server. It is in XML format and allows you to transport a variety of data types used in .NET. As an alternative to SOAP, we can use HTTP-GET and HTTP-POST, which will be covered later in the article. These protocols return the output in a non-SOAP format, however this output is still in XML format.

UDDI, DISCO, SOAP, WSDL

You might also like...

Comments

About the author

James Yang Australia

James is a student at Georgia Institute of Technology, majoring in Computer Science. He is an MCSE, MCDBA, MCSA and CCNA.

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” - Brian Kernighan