Test 3 |
Due 7:30pm EST, December 12, 2003
Work independently and show your work.
Read thoroughly and contact me immediately at rwisman@ius.edu if clarification is required.
Do all questions.
0. (1 pt) What does the smiley :-X mean?
1. (10 pt)
Give the XML that defines the family tree of descendants for one set of grandparents, similar to that below. The tree should be organized by relationship to the grandparents (son, daughter, grandson, granddaughter) and include name and date of birth for each person in the tree.
grandparents
|
| | |
son daughter daughter
|
| |
grandson granddaughter
Verification and display of the XML is described below.
- XML to define two employees with first and last names. As a test, copy the following to file named family.xml:
<?xml version="1.0"?>
<Employees>
<Employee>Secretary
<First>James</First>
<Last>Borg</Last>
</Employee>
<Employee>Manager
<First>Joyce</First>
<Last>English</Last>
</Employee>
</Employees>
- JavaScript to test that the XML is well-formed and format to reflect the hierarchy. Copy to file named parser.htm in same directory as family.xml file.
<SCRIPT LANGUAGE="JavaScript">
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
try { xmlDoc.load("family.xml");
document.write("<pre>");
traverse(xmlDoc.documentElement,"");
document.write("</pre>");
}
catch(e) { document.write( "URL "+xmlDoc.parseError.url+" Line "+xmlDoc.parseError.line+
" position "+xmlDoc.parseError.linepos+" "+
xmlDoc.parseError.srcText + " " + xmlDoc.parseError.reason);
}
function traverse(node,indent) {
var i, children, type = node.nodeTypeString;
if (type == "element") {
document.write("<br>" + indent + node.nodeName);
children = node.childNodes;
if (children != null)
for (i=0; i<children.length; i++)
traverse (children.item(i), indent + "| ");
}
else document.write(" " + node.text);
}
</SCRIPT>
- In the browser address enter: parser.htm to verify that the XML in family.xml is well-formed. The browser result is:
Employees
| Employee Secretary
| | First James
| | Last Borg
| Employee Manager
| | First Joyce
| | Last English
2. (5 pts) An HTML page is as follows:
<html><body>
<a href="www.ius.edu">Click here</a>
</body></html>A user clicks the hyperlink.
- What are the line(s) sent then by the browser to the Web server.
- What are the first six lines sent from the Web server to the browser.

The above diagrams a typical network consisting of:
- Host A connected by an Ethernet LAN to router/gateway A.
- Router/gateway A connected on the left by an Ethernet LAN and on the right by a point-to-point connection to router/gateway B.
- Router/gateway B connected on the left by a point-to-point connection to router/gateway A and on the right by an Ethernet LAN.
- Host B connected by an Ethernet LAN to router/gateway B.
3. (25 pts)
The characters of your first name are transmitted from Host A to Host B as a single packet to an UDP application on an 802.3 LAN as in the diagram above.
- List five protocols required to send the one UDP datagram from Host A to Host B.
- Give the details of the message containing your first name as sent by Host A to Host B.
- Ethernet - Give the frame (see page 276 of the text) source and destination address, length, data, and pad fields.
- IP - Give the header (see page 434 of the text) total length, fragment offset, source and destination address, and data.
- UDP - Give the complete header (see page 526 of the text) and data, the checksum is not computed.
- The packet crosses the point-to-point network having a maximum packet size of 40 bytes. Which protocol handles fragmentation?
- Give the details of the message containing your first name as received by Host B.
- Ethernet - Give the frame (see page 276 of the text) source and destination address, length, data, and pad fields.
- IP - Give the header (see page 434 of the text) total length, fragment offset, source and destination address, and data.
- UDP - Give the complete header (see page 526 of the text) and data, the checksum is not computed.
4. (10 pts) For the network diagram above:
- What should be the default gateway for Host A?
- What should be the default gateway for Host B?
- Give the route command(s) to define the static routing table for Gateway/router A.
- Give the route command(s) to define the static routing table for Gateway/router B.
5. (10 pts)
The following program returns a delayed quote of IBM stock price. Though not necessary, the StockQuote.vbs file can be executed on a computer with .NET installed at command prompt by: cscript StockQuote.vbs
Set gr = CreateObject("MSSOAP.SoapClient") gr.mssoapinit "http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl" wscript.echo gr.getQuote ("IBM")
6. (30 pts) Project Questions - Do any 5.