This laboratory will consist of a series of tasks designed to familiarize you with the tools and technologies related to Big Web Services.
[MANDATORY] Test iw7i-hellows
and iw7i-hellocli
The first step is to update your git
projects. The outcome of this step should be retrieving
from GitHub
the following maven modules
:
iw7i-hellows
. This module is a standalone simple Web Service that can be run with the classiw7i.bigws.hellows.Server
. This class publishes the service athttp://localhost:8080/helloWorld
. It'w WSDL should be avalilable athttp://localhost:8080/helloWorld?wsdl
.iw7i-hellocli
. This module is a simple client mainly generated by the toolwsimport
from the above WSDL. The classiw7i.bigws.hellows.Client
runs the client.
Next you should import them into your eclipse workspace and test them.
[MANDATORY] Deploy iw7i-hellows
in a Web Container
The goal of this task is the transformation of iw7i-hellows
from a jar
project to a war
project.
This task is quite complex and requires:
- In the
pom.xml
: - Change the package to
war
(it'sjar
by default) - Add
com.sun.xml.ws:jaxws-rt:2.2.7
as a dependency - Create the file
src/main/webapp/WEB-INF/web.xml
and add: - Declare the
com.sun.xml.ws.transport.http.servlet.WSServlet
servlet provided byjaxws-rt
. - Declare the
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
listener provided byjaxws-rt
. - Map a URI pattern to the servlet
- Create the file
src/main/webapp/WEB-INF/sun-jaxws.xml
and bind the classiw7i.bigws.hellows.HelloWebService
with the endpoint. - Update project with
maven
- And then deploy (using the
Server view
) the application in the Tomcat server managed by eclipse.
This task is intended to be done with the help of the avaliable documentation at jax-ws.java.net This task is fulfilled when you can get the WSDL document from the URI where you have published the Web service.
[MANDATORY] Rebuild iw7i-hellocli
wsimport
hardcodes the URI of the Web service in the generated code. Hence, a change in the enpoint of
the requires require to regenerate the code. Then, update pom.xml
accordingly and perform the required
steps for updating the code according to your configuration.
This task is intended to be done with the help of the available documentation at JAX-WM Maven plugin.
[MANDATORY] Design and implement the application
Transform the project iw7i-xml
into a Web Service application. An open discussion will provide the
guidelines of this task.
[EASY CHALLENGE +0.20] Automate the build and the deployment of a .war
file containing the application to Tomcat using Maven
[EASY CHALLENGE +0.30] Test the Web services of your application with maven and junit as automatically as possible
[HARD CHALLENGE +1.00] Develop a working example where the usage of asynchonous web services with WS-Addressing
has sense in your application