Assignment 6 - due on 03/29 [xhtml]

Visit the BART website at http://www.bart.gov/ and locate the form on the left side for checking the train schedule. Try that form out and check the responses for the different options of the form (i.e. times, arriving vs. departing, etc.).

Imagine you've been tasked with making this into a web service. You need to design a request and response vocabulary that duplicates this form. Using the SOAP messaging "standard" is not required for this service and so all you need to do is develop the XML input and output.

To do this for this assignment, please accomplish the following tasks:

  1. Write down several request scenarios that duplicate the options on the form. That is, besides choosing the basics of starting and ending destinations, the time can be requested as the arriving or departing time. You should create eight scenarios with stations and time/departing/arriving options. Make four two/from stations combinations and create a two different time requests--one for departing and one for arriving. That makes eight scenarios in all.

  2. Run your scenarios through the BART website form and look at the data (train schedule/etc.) that comes back. You should try to write down some conceptual model of the kind of information you need to return from your service.

  3. Experiment with constructing a few XML documents that encode (1) and (2). You need not do all eight to get a feel for the kind of XML structure you'd like to encode.

  4. The web service will process and return only one vocabulary and so you only need one target namespace for your documents and schema. Decide on a namespace for your documents and create a schema document for that namespace.

  5. Write one XML schema that describes your request to the web service and the response it returns. That is, one schema using your namespace from (4) that validates both the request and the response.

    You should use XML Schema simple types as much as possible for this schema to encode dates, times, durations, etc. Your XML does not have to map to form directly. For example, the month and day can be encoded as one element or attribute in your XML. Your information does not have to be separated as the user interface does on the website--just be mappable.

  6. Encode all eight scenarios from (1) as XML request documents and at least two responses as XML documents that correspond to (2). You should encode all the traing schedule information returned by your requests when you put them into the form in (2). Compare your instance to the results of (2) to make sure you've covered all the important data.

You assignment will be graded based on the schemas and the example instances. It is easy to check that all the important information is in your XML. Obviously, your instances should be valid against your schema.

Please turn in a zip file that contains:

  1. Your schema document (.xsd file).

  2. An OASIS XML Catalog that maps your namespace to your schema document.

  3. Your example instances labeled appropriately as requests and responses. You should have eight request documents. In addition, you should have two response documents that match two of the requests. Please label this clearly.

You may include a 'readme.xhtml' document that explains the above.

I should be able to validate your instances against your schema using the catalog you turn in. Please do not use the xsi:schemaLocation attribute!

[syllabus]