Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 3.27 KB

bigws.md

File metadata and controls

62 lines (43 loc) · 3.27 KB

Lab 2. Big WS

This laboratory will consist of a series of tasks designed to familiarize you with the tools and technologies related to Big Web Services.

Task 2.1: Test iw7i-hellows and iw7i-hellocli

[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 class iw7i.bigws.hellows.Server. This class publishes the service at http://localhost:8080/helloWorld. It'w WSDL should be avalilable at http://localhost:8080/helloWorld?wsdl.
  • iw7i-hellocli. This module is a simple client mainly generated by the tool wsimport from the above WSDL. The class iw7i.bigws.hellows.Client runs the client.

Next you should import them into your eclipse workspace and test them.

Task 2.2: Deploy iw7i-hellows in a Web Container

[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's jar 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 by jaxws-rt.
  • Declare the com.sun.xml.ws.transport.http.servlet.WSServletContextListener listener provided by jaxws-rt.
  • Map a URI pattern to the servlet
  • Create the file src/main/webapp/WEB-INF/sun-jaxws.xml and bind the class iw7i.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.

Task 2.3: Rebuild iw7i-hellocli

[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.

Task 2.4: Design and implement an electronic Address Book with Web Services

[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