Programming Assignment #1
Fun with Eclipse and Web Services

Due on Thursday January 31 before midnight.


This project must be done individually. No copying is permitted. The purpose of this project is to learn how to call a SOAP-based web service in Java using Eclipse.


You will do this project on your own PC/laptop using Eclipse. Directions:

Install Eclipse IDE for Java EE Developers from Choose "Eclipse IDE for Java EE Developers", download the latest version: Juno 4.2 and unzip. It will create a folder named "eclipse". Start Eclipse by going to the "eclipse" folder and by double-clicking on eclipse.exe. From the top menu, click on Help -> Install New Software... Select to Work with "The Eclipse Web Tools Platform (WTP) software repository" and Select and install the following Software from "Web Tools Platform (WTP) 3.4.1":

  Axis2 Tools SDK
  CXF Web Services SDK
Push Next and then Finish.

Download and unzip Apache Tomcat 7.0 (the Core). Start Eclipse and click on Window -> Show View -> Other... -> Servers to get the Servers window. On the Servers window click to define a new server then select Apache/Tomcat v7.0. Choose your apache-tomcat folder and push "finish". You should now see "Tomcat v7.0 Server at localhost" listed under the Servers tab at the bottom.



The Dictionary Web Service

A SOAP Web service is a software system identified by a URI whose public interfaces and bindings are defined and described using XML. It is intended to be used by web applications. Both the input and output of a SOAP web service are in XML. The XML description of a Web service is called WSDL (Web Service Description Language). The Apache Axis tool generates client stubs from WSDL files, so that applications can consume services by just calling Java methods (XML is completely hidden).

For this project, you will use the Dictionary Web Service provided by In particular, you will use the SOAP method Define, DefineInDict, and DefineList. Create a new Java Project from the top menu in Eclipse using File -> New -> Other... -> Java Project. Use the Project name: project1. Push Finish. On the Package Explorer (left column), R-click on project1, and choose New -> Other.. -> Web Services -> Web Service Client. Put the WSDL URL and push Finish. R-click on project1 and choose New -> Class. Use for Package and Project1 for Name, choose "public static void main(String[] args)", and push Finish. In the project/src directory in Package Explorer you will see the and packages. Use the constructor DictServiceSoapProxy() to create a proxy object that connects to the Web Service. All web service requests (such as defineInDict) are methods of this class.

Your Dictionary Application

Your Java program should print all available dictionaries and then should ask for a dictionary ID and a word name. If the dictionary ID is empty, your program will print the word definition in all dictionaries. If it is a valid dictionary ID, your program will print the word definition in this dictionary. Otherwise it will report an error.

What to Submit

Use the form below to submit the file only. We do not accept email or hardcopy submissions. You need a username and password to submit your project. You should have already received an email from your instructor at your account with your username and password. You may submit multiple files, if you like, as long as they have different names. These files are automatically uploaded directly into your personal class account for this particular project, so you don't have to include your name or student ID or project number in the file name. You may submit your files as many times as you like, but only the most recently submitted files will be retained and evaluated (newly submitted files replace the old files under the same file name). After you submit the files, please double-check that your submitted files are correct by clicking on the Status link and by downloading your submitted file. If you cannot login or have a problem submitting the project using this form, ask the GTA for help.

Submit Project #1:

Last modified: 01/24/13 by Leonidas Fegaras