Chapter 9: ADO.NET and Web Services


Overview

As you saw in earlier chapters, Web services can be extremely useful for accessing data stored in databases. In Chapter 2, for example, we used a Web service to access a music database, retrieving the albums released by a specified artist. To do this, we sent a DataSet object via a Web method.

Of course, you can do an awful lot more with the combination of data access and Web services. For starters, you’ll probably want to update data as well as extract it. You might also want to access other data sources, such as XML files, data stored in Active Directory, or even files stored on servers. Web services allow you to expose data from a plethora of sources, both current and legacy, via a single, standard interface.

In this chapter, we’ll take a closer look at where Microsoft ADO.NET fits in with Web services. We’ll start with a look at basic techniques and ways of streamlining performance and dealing with disparate clients. This involves repackaging data and even avoiding DataSet objects altogether in some cases to make the XML that the client receives as simple as possible. You’ll also see how to use XML for SQL Server (SQLXML) to obtain XML straight out of a Microsoft SQL Server database, without having to go through an intermediate DataSet object representation.

We’ll then look at how to use ADO.NET in combination with other, more advanced, techniques, including accessing data stored in locations other than a database. This will involve looking at the XPath and XQuery specifications, which enable you to locate information within the body of an XML file.




Programming Microsoft. NET XML Web Services
Programming MicrosoftВ® .NET XML Web Services (Pro-Developer)
ISBN: 0735619123
EAN: 2147483647
Year: 2005
Pages: 172

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net