After completing Lab Assignment 2, students should be able to
| Team 1 | Team 2 | Team 3 | Team 4 | Team 5 |
|---|---|---|---|---|
| Liam | Brock | Samwise | Tom | Paul |
| Trevor | Gary | Kevin | Ben | Gene |
You may wish to review the basic pair programming guidelines before you begin.
You should change roles with each iteration
Create a Lab2 Visual Studio solution containing two projects: Lab2WebService and Lab2WebSite. You Web Service will provide website clients with information about colors available based on the make and model of a car.
Accessing specific data in an XML Document is done with XPath. W3Schools has a popular XPath Tutorial.
In one of your two accounts, create a VS solution named Lab2 and add a web service project to this solution named Lab2WebService.
Working together as driver and navigator
Lab2WebService, expose a Web Method named GetColors that accepts as two input parameters:
make (as string)model (as string)GetColors method returns an XmlNode containing the corresponding colors element with the colors available for the specific make/model
colors elementBefore beginning these functional tests, switch roles between driver and navigator. Test and debug your service.asmx service by viewing it in the browser and by running it with the VS debugger.
Test 1: test your Web Service with make = "Acura" and model = "RL". Expected return value is
<?xml version="1.0" encoding="utf-8" ?>
<colors>
<color name="Red" />
<color name="Bright Red" />
</colors>
Test 2: test your Web Service with make = "BMW" and model = "3 series" Expected return value is
<?xml version="1.0" encoding="utf-8"?> <colors> <color name="Blue" /> <color name="Sky Blue" /> <color name="Racing Blue" /> </colors>
Test 3: test your Web Service with make = "Suburu" and model = "Outback" Expected return value is
<?xml version="1.0" encoding="utf-8"?> <colors />
Begin this iteration with the same roles used with Iteration 1's functional testing. That is, the current driver should have begun Iteration 1 as the navigator, the current navigator should have begun Iteration 1 as the driver.
Right-click your Lab2 solution and add a ASP.NET Web Site to this solution named Lab2WebSite.
Lab2WebServicedefault.aspx page to test your GetColors method
Page attribute ValidateRequest="False"
Before beginning iteration 3, switch roles between driver and navigator.
color XmlNodes from the colors element by using SelectNodes("color")foreach loop to add to your Drop Down List's Items collection the color node's Attributes["name"].InnerText (the actual color as a string) 
Lab 2 is due by the start of class on Friday
U:\Labs\nnLab2 in one of your cs352 accounts where nn is your account numberDefault.aspx page as displayed in the browser with Audi A4 as the test case