08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

106<br />

CHAPTER 5 ■ <strong>ASP</strong>.<strong>NET</strong> WEB SERVICES<br />

document containing its response to you (this style of web service is more formally called<br />

an XML web service).<br />

Another interesting facet of modern XML web services is that the service describes<br />

itself also using XML. Based on this description, you can craft your requests <strong>and</strong> underst<strong>and</strong><br />

the responses you receive. Nowhere in this picture are you bound to a particular<br />

web presentation technology; therefore, when using web services, you can (in theory at<br />

least) present your data to clients that use a different technology base (such as Java 2<br />

Platform Enterprise Edition [J2EE]), or conversely, consume data that is available on a<br />

different technology base.<br />

In this chapter, you’ll look at web services with <strong>ASP</strong>.<strong>NET</strong>. You’ll look into how to create<br />

<strong>and</strong> consume them, <strong>and</strong> you’ll explore interoperability technologies that will ensure that<br />

your applications can be consumed by others.<br />

<strong>Web</strong> Services Architecture<br />

XML web services are defined by the W3C as a software system designed to support<br />

interoperable machine-to-machine interaction over a network. The XML <strong>Web</strong> Services<br />

specification serves as the basis for communicating information that is well defined <strong>and</strong><br />

generally available for any technology that implements the specification. The concept<br />

of computer-to-computer data communication isn’t new; technologies such as DCOM<br />

(Distributed Component Object Model) <strong>and</strong> CORBA (Common Object Request Broker<br />

Architecture) have had this functionality for some time. Where XML web services differ is<br />

in how they achieve this goal. Instead of using a proprietary data representation, often<br />

called a “wire protocol,” they use XML, which has become a leading st<strong>and</strong>ard for communicating<br />

data across the network.<br />

<strong>Web</strong> services come from the application of several different technologies. These are<br />

as follows:<br />

Hypertext Transmission Protocol (HTTP): This is the well-known means of clientserver<br />

communication that the Internet is built on.<br />

XML: This enables data to be encoded in a machine-readable, richly attributed<br />

format.<br />

Simple Object Access Protocol (SOAP): This is a variant of XML <strong>and</strong> is used to encode<br />

requests to a service <strong>and</strong> response data from the service.<br />

<strong>Web</strong> Services Description Language (WSDL): This is a variant of XML <strong>and</strong> is used to<br />

describe a web service. This description can be interpreted by a client machine to<br />

decipher how the SOAP document structure will be set up to talk to a specific server’s<br />

web service.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!