SUMMARY
This article provides a roadmap to learn and to master the
DataSet objects and Extensible Markup Language (XML) Web
services.
Roadmap articles provide links to useful information,
including online documentation, Microsoft Knowledge Base articles, and
Microsoft white papers, to help you learn about a Microsoft product or
technology. Microsoft Knowledge Base How-To articles and walkthroughs provide
step-by-step instructions to complete specific tasks. Microsoft QuickStart
sample files are ready-made programs that illustrate a specific
technique.
For additional information about ADO.NET technology roadmap
articles, click the article numbers below to view the articles in the Microsoft
Knowledge Base:
313590 INFO: Roadmap for ADO.NET
313649 INFO: Roadmap for XML Integration with ADO.NET
308044 INFO: Roadmap for Using ADO in .NET
back to the top
Overview
An XML Web service is a basic building block of a distributed
application for the Internet. With XML Web services, you can call functions
over the Internet or intranet through HTTP and XML.
Additionally, you
can use XML Web services to pass information in an XML format between
applications, regardless of the operating system and the programming language.
Because XML Web services use XML, SOAP, and other standard Web protocols, you
can pass information between clients and servers with different architectures
and operating systems. For example, a Microsoft server can communicate
seamlessly with a UNIX client or vice versa. This makes XML Web services a
great choice for integrating systems in a company or between companies. You can
create a Microsoft ASP.NET Web service in Microsoft Visual Basic .NET,
Microsoft Visual C# .NET, or Microsoft JScript.
For more information,
visit the following MSDN Web sites:
back to the top
Architecture
Similar to component-based development, you can use XML Web
services to pass information to and from client applications, regardless of how
the service was implemented. Unlike component-based development, XML Web
services uses the following standard protocols to pass information between
clients and servers:
- XML
- SOAP
- Web Services Description Language (WSDL)
- Universal Description, Discovery, and Integration
(UDDI)
Because XML Web services use these standard Web protocols, XML
Web services can be multi-environment compatible. Each of these Web protocols
address a requirement of an XML Web service. The next four sections describe
how these Web protocols address these requirements.
back to the top
XML Protocol
XML addresses the XML Web service requirement to represent data
in a standard way. The data that is passed to and from the XML Web service is
in XML format. Because the ADO.NET
DataSet object is the only object that can be serialized, this is the
only object that can be passed to and from the Web service.
Object
serialization is the process of converting an object into a form that can be
easily transported, such as converting the
DataSet into XML.
For additional information about serialization, click the
article number below to view the article in the Microsoft Knowledge Base:
314150 INFO: Roadmap for XML Serialization in the .NET Framework
The client application can receive the
DataSet from the XML Web service and then pass the
DataSet back to the XML Web service to process any changes to the
database. Objects such as
Connection objects,
Command objects, and
DataReader objects cannot be passed because they are not
serializable.
back to the top
SOAP Protocol
When a client application requests information from a database
from an XML Web service, the information is placed in a
DataSet. This
DataSet is then converted into XML that meets the standards that the SOAP
messaging protocol sets. This XML is passed from the XML Web service to the
client. The XML of the
DataSet takes one of two forms:
- XML document that displays the current values.
- DiffGram, which is an XML document that displays the
original and the current values of only those DataSet records that have changed.
If you use the first form and pass back all of the
DataSet, the XML appears similar to the following:
<NewDataSet>
<Customers>
<CustomerID>ALFKI</CustomerID>
<CompanyName>David</CompanyName>
<ContactName>Joy Promise 1</ContactName>
<ContactTitle>CEO</ContactTitle>
<Address>123 Fox Way</Address>
<City>Berlin</City>
<Region>MA</Region>
<PostalCode>12209</PostalCode>
<Country>Germany</Country>
<Phone>030-0074321</Phone>
<Fax>030-0076545</Fax>
</Customers>
</NewDataSet>
If you pass back only the DiffGram, the code appears as follows:
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Cust diffgr:id="Cust1" msdata:rowOrder="0" diffgr:hasChanges="modified">
<CustomerID>FOLKO</CustomerID>
<Country>Morocco</Country>
</Cust>
</NewDataSet>
<diffgr:before>
<Cust diffgr:id="Cust1" msdata:rowOrder="0" xmlns="">
<CustomerID>FOLKO</CustomerID>
<Country>Sweden</Country>
</Cust>
</diffgr:before>
</diffgr:diffgram>
Notice that in both examples, the information that is being passed is
in XML format. However, in the DiffGram, only the changed records of the
original
DataSet are sent. These changed records are marked with a
<diffgr:before> tag in the DiffGram to indicate the original values of
the
DataSet. Additionally, notice that the deleted rows are only displayed
with a <diffgr:before> tag in the DiffGram.
If you use
DiffGram, you pass less information from the client to the server. When the
DataSet is marshaled between the client and the Web server as XML, any
application that Microsoft .NET does not create can work with the
information.
For more information about the SOAP protocol, visit the
following MSDN Web sites:
back to the top
WSDL Standard
You use the Web Services Definition Language (WSDL) standard when
you are using XML Web services that others have written. To call an XML Web
service successfully, you must know the following information:
- How to get to the service.
- What operations the service supports.
- What parameters the service expects.
- What the service returns.
WSDL provides all of this information in an XML document that
can be read or that a computer can process.
For more information
about the WSDL standard, visit the following MSDN Web sites:
For more information about the WSDL specification, visit the
following World Wide Web Consortium (W3C) Web site:
back to the top
UDDI Standard
You use the Universal Description, Discovery, and Integration
(UDDI) standard when you are using XML Web services that others have written.
With this standard, programmable XML Web services can be placed on Web sites
where others can access and interact with them. Universal Discovery,
Description and Integration (UDDI) supports the discovery and the description
of XML Web services.
For more information about UDDI, visit the
following MSDN Web sites:
back to the top
QuickStart Tutorials
For a QuickStart tutorial about XML Web services, visit the
following Microsoft Web site:
back to the top
How-To Articles
Microsoft Knowledge Base How-To articles provide step-by-step
instructions to complete specific tasks.
For additional information about XML Web services,
click the article numbers below to view the articles in the Microsoft Knowledge
Base:
308056 HOW TO: Update Server Data Through a Web Service by Using ADO.NET and Visual Basic .NET
308054 HOW TO: Use a Web Service as a Data Source for a Client Application in Visual Basic .NET
309013 HOW TO: Create and Test an XML Web Service in Visual Basic .NET
308359 HOW TO: Write a Simple Web Service by Using Visual C# .NET
315935 HOW TO: Build and Use XML Web Services by Using Visual Studio .NET
308466 HOW TO: Integrate an Apache SOAP 2.2 Client with a .NET XML Web Service
301273 HOW TO: Write a Simple Web Service by Using Visual Basic .NET
Click
here to see additional How-To articles about XML Web
services For more information about how to create XML Web
services by using Microsoft Office XP, visit the following MSDN Web sites:
back to the top
Walkthroughs
Walkthroughs provide mini-tutorials that walk you through some
typical application development scenarios that use XML Web services. For more
information, visit the following MSDN Web site:
back to the top
Guidelines
For more information about XML Web services guidelines, visit the
following MSDN Web site:
back to the top
Troubleshooting
If you experience problems or if you have questions, you can
refer to the MSDN newsgroups where you can share your experiences with your
peers. You can also use the Microsoft Knowledge Base to search for articles
about specific issues.
back to the top