13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

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.

⋮A configuration section handler is simply a .<strong>NET</strong> Framework class that parses aparticular <strong>XML</strong> fragment extracted from the CONFIG file. We'll look at custom sectionhandlers <strong>in</strong> more detail <strong>in</strong> Chapter 15.Interoperability<strong>XML</strong> is key to mak<strong>in</strong>g .<strong>NET</strong> Framework applications <strong>in</strong>teroperate with each other andwith external applications runn<strong>in</strong>g on other software and hardware plat<strong>for</strong>ms. <strong>XML</strong><strong>in</strong>teroperability is a sort of blanket term that covers three .<strong>NET</strong>-specific technologies:<strong>XML</strong> Web services, remot<strong>in</strong>g, and <strong>XML</strong> object serialization.By roll<strong>in</strong>g functionality <strong>in</strong>to an <strong>XML</strong> Web service, you can expose the functionality toany application on the Web that, irrespective of plat<strong>for</strong>m, speaks HTTP andunderstands <strong>XML</strong>. Based on open standards (HTTP and <strong>XML</strong>, but also SOAP), <strong>XML</strong>Web services are an emerg<strong>in</strong>g technology <strong>for</strong> system <strong>in</strong>teroperation and are supportedby the major players <strong>in</strong> the IT <strong>in</strong>dustry. The .<strong>NET</strong> Framework provides a special<strong>in</strong>frastructure to build both remote services and proxy-based clients.Actually, <strong>in</strong> the .<strong>NET</strong> Framework, an <strong>XML</strong> Web service is treated as a special case ofan ASP.<strong>NET</strong> application—one that is saved with a different file extension (.asmx) andaccessible through the SOAP protocol as well as through HTTP GET and POSTcommands. Incom<strong>in</strong>g calls <strong>for</strong> both .aspx files (ASP.<strong>NET</strong> pages) and .asmx files areprocessed by the same Internet In<strong>for</strong>mation Services (IIS) extension module, whichthen dispatches the request to dist<strong>in</strong>ct downstream factory components.In an <strong>XML</strong> Web service, <strong>XML</strong> plays its role entirely beh<strong>in</strong>d the scenes. It is first used asthe glue <strong>for</strong> the SOAP payloads that the communicat<strong>in</strong>g sides exchange. In addition,<strong>XML</strong> is used to express the results of a remote, cross-plat<strong>for</strong>m call. But what if you writea .<strong>NET</strong> <strong>XML</strong> Web service with one method return<strong>in</strong>g, say, an ADO.<strong>NET</strong> DataSetobject? How can a Java application handle the results? The answer is that the DataSetobject is serialized to <strong>XML</strong> and then sent back to the client.The .<strong>NET</strong> Framework provides two types of object serialization: serialization through<strong>for</strong>matters and <strong>XML</strong> serialization. The two live side by side but have differentcharacteristics. <strong>XML</strong> serialization is the process that converts the public <strong>in</strong>terface of anobject to a particular <strong>XML</strong> schema. The goal is simplify<strong>in</strong>g the process of dataexchange between components rather than truly serializ<strong>in</strong>g objects that will then bedeserialized to liv<strong>in</strong>g and effective <strong>in</strong>stances.Remot<strong>in</strong>g is the .<strong>NET</strong> Framework counterpart of the Distributed Component ObjectModel (DCOM) and uses <strong>XML</strong> to configure both the client and the remote components.In addition, <strong>XML</strong> is used through SOAP to serialize outbound parameters and <strong>in</strong>boundreturn values. Remot<strong>in</strong>g is the official .<strong>NET</strong> Framework API <strong>for</strong> communicat<strong>in</strong>gapplications, but it works only between .<strong>NET</strong> peers.<strong>XML</strong> serialization, remot<strong>in</strong>g, and <strong>XML</strong> Web services are covered <strong>in</strong> Part IV—specifically<strong>in</strong> Chapter 11, Chapter 12, and Chapter 13.From MS<strong>XML</strong> to .<strong>NET</strong> Framework ClassesPrior to the advent of the .<strong>NET</strong> Framework, manag<strong>in</strong>g <strong>XML</strong> <strong>in</strong> the <strong>Microsoft</strong> worldmeant us<strong>in</strong>g the COM-based MS<strong>XML</strong>, now available <strong>in</strong> version 4.0, SP1. It goes11

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

Saved successfully!

Ooh no, something went wrong!