Project 6 – Web Services

 

Objectives

Gain experience publishing and accessing web services.

Functional Requirements

Add a web service to your web-based chat system that allows web service clients to perform the following functions:

 

1)      Create new discussions

2)      Delete discussions

3)      Retrieve a list of all discussions sorted by creation time

4)      Retrieve all comments for a particular discussion sorted by creation time

5)      Submit a new comment to a particular discussion

 

Write a simple web service client that allows a user to invoke the functions listed above.  For example, your client might provide a simple command-line interface that supports the following commands:

 

create-discussion user name

delete-discussion user id

list-discussions user

list-comments user id

send-comment user id text

 

The output of the list-discussions command might look like this:

 

Discussion[10, BYU Sports, kjr52]

Discussion[11, Tech News, kjr52]

Discussion[12, Politics, kjr52]

 

Sample output of the list-comments command might look like this:

 

<<<<< kjr52 Mon May 16 18:06:45 MDT 2005 >>>>>

 

The football team had a bad year

 

<<<<< kjr52 Mon May 16 18:07:23 MDT 2005 >>>>>

 

Yeah, but Bronco is going to save the day.

I can't wait for Bronco Ball!

 

<<<<< kjr52 Mon May 16 18:08:03 MDT 2005 >>>>>

 

I can't believe that Steve Cleveland left BYU for a WAC school.  It's embarrassing.

In order to avoid typing plain-text passwords on the command-line, your web service is not required to authenticate users (although you may if you want to).  However, your web service should still require clients to send their user names (but not passwords) to support server functions that depend on the user name.

 

If you prefer, you may implement a simple GUI-based client interface instead of a command-line interface.  GUIs are better at hiding passwords than command-line interfaces, so there are advantages to using a GUI.

Implementation Requirements

You may implement your web service either as a stateless session bean or as a regular Java object, whichever you prefer.

 

You may implement your web service client in any programming language that you want (Java, C#, Python, Perl, etc.).   The TA will only be able to help with Java clients, but if you know (or want to learn) how to implement web service clients in another language, you are free to do so.  Whatever you do, it must be possible and convenient for the TA to run your client on CS Dept. computers for pass off purposes.

Project Submission

Create a gzip-compressed tar file containing all of your project's source files and directories. The name of the file must have the following format:

 

firstname_lastname.tgz
 

where firstname should be replaced with your first name and lastname should be replaced with your last name. For example, if your name is Bob White, you would use the following command to create your compressed tar file:

 

$ tar czf Bob_White.tgz project-dir

 

(this assumes that your project files are stored in a subdirectory named project-dir).

After you have created your tar file, click on the following link to go to the project submission web page:

Project 6 Submission Page

After you provide your CS account login name and password and the name of your tar file, this page will upload your tar file to our server.

After submitting your tar file, in order to receive credit you must also pass off your project with a TA. When you pass off, you will be asked to download your tar file from our server to ensure that you are passing off the same code that you turned in.  The project retrieval page is located at the following link:

Project 6 Retrieval Page