Webservice Assignment
Webservice Assignment
INFORMATION TECHNOLOGY
COURSE NAME
: TECHNOLOGY OF WEB
COURSE CODE
SERVICES
: BIW 20404 (SECTION 1)
PROGRAMME
: 2 BIW
INSTRUCTOR
NAME OF
STUDENTS
MUNIESBARARAJAN
CI
130121
Figure 1.1
To create a new project, select File->New->Dynamic Web Project from the menu bar of the
Eclipse IDE.
Page 2
Figure 1.2
Next we need to specify the name for the web service project as shown in figure 1.2. Then give a
project name and select a target runtime (Apache Tomcat v8.0) and leave all other default values
and click next to finish.
BIW20404 WEB SERVICE
Page 3
Page 4
Figure 1.3
Create a new package under Java Resources -> src named bmi. Then, create a new java class
under that package. This is the web services service provider class.
Page 5
Figure 1.4
Use the code in figure 1.4 for the service. This is a simple service which will return the bmi value
based on the argument passed. Save all the work and with this step everything is over. The
Eclipse IDE it will take care of all the remaining work like creating web service, generating
wsdl, skeleton, service client, stub and etc.
Page 6
Figure 1.5
To create a web service using this java class, right click on Java Resources -> New and select
Web Service under Web Services folder from the wizard. Click Next button.
Page 7
Figure 1.6
In this Web Service wizard, use the browse button and select the java class written earlier. This is
our service implementation java class. Then, drag the slider bar to upper most in both service and
client part. Then, enable the Publish the Web service check box.
Page 8
Figure 1.7
Click next till the Server Starup wizard and then click Start Server. This step will start the
associated runtime Tomcat. Just wait for this step to complete and we will be able to see the web
service client application generated
Page 9
d. Test Client
Figure 1.8
Figure 1.8 shows the web service application which has been successfully generated. You can now test
your web service and see if it is working according to the way you want it.
Page 10