Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Day 16. Creating XML Web Services
This workshop will help reinforce the concepts you've learned in today's lesson. The answers can be found in Appendix A.
What's a Web service?
What does SOAP stand for, and what does it do?
What's a service description?
What class (including namespace) must a Web service inherit from?
Write an arbitrary Web method that enables caching and disables session state.
True or false: A Web method can take advantage of intrinsic ASP.NET objects, such as Session and cache.
True or false: A Web method can return a DataSet.
Examine the XML service description for the database service you created earlier today. Try to understand each of the tags, recalling the discussions on XML and XML schemas. Note that much of the file describes how the different protocols (Http-Get, SOAP, and so on) are to send and receive data.
Create a Web service that converts one unit of measurement into another. This method should take three parameters: a value, a unit to convert from, and a unit to convert to. Allow the user to convert to and from the following: millimeters, centimeters, inches, feet, meters, yards, miles, and kilometers. Don't forget to test it with the HTML Description page!
(Don't worry if you don't know the exact conversions between units of measurement. Just make something up.)