XML-Based Java Chat Client

The purpose of this assignment was to:

The description and my solution of the XML-Based Java Chat Client - assignment can be viewed at the bottom of this page.

What is a protocol?

A protocol is a formal description of message formats and the rules that two computers must follow in order to exchange those messages in their communication.

How to write a protocol in XML

One has to come up with elements and attributes for structuring the information that should be used in the communication, and then use a DTD or XSD to define and constrain those elements and attributes.

Assignment Description

Create a Java Chat Client that uses an XML-based protocol constrained with message.dtd.

Use either JDOM or JAXP package.


My solution, Assignment Files

I chose to use JDOM.

To try the Chat Client you first need to create a XML-based Java(or any other programming language) Chat Server. The teacher for this course already had one created so that we could try our Chat Clients. Since I'm not sure he wan't me to make the address for this server public, you will have to create your own XML-based Chat Server to try the XML-based Java Chat Client.

You could, however,do some changes to the Java Chat Server from the Internet Programming 1 Course to make it XML-based.

To run the Chat Client:

Unix/Linux: java -classpath jdom.jar:. Chat

Win32: java -classpath jdom.jar;. Chat

When you've downloaded and compiled the .java files below, you've got to put jdom.jar in your classpath.

XML-Based Java Chat client source files:

«  Previous Next  »
Loading