Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools

Assignment 6: SOA

Release date: Monday 19.11.12 - Due date: Sunday, 25.11.12, 23:59

Task 23: WSDL Styles

2 points

Read the following article on the different WSDL styles:

Discuss in a few sentences why the document/literal wrapped WSDL style is commonly used and what its limitations are.

Task 24: REST

4 points

Consider the WSDL declaration for a global weather Web Service: 

You can compose a REST (HTTP-GET) request that determines the weather in Bonn in a browser of your choice by calling:

a.) Find and write down the definition of this operation in the WSDL file. Write down the answer of this request.

b.) Compose a request that determines all German cities provided by the weather service.

Task 25: SOAP

12 points

Consider the WSDL declaration for a FIFA World Cup 2010 Web Service:

a.) Which operations of the Web Service do not require any parameters?

b.) Describe the parameters of the operation “PlayedAtWorldCup”?

c.) Describe the return type of the operation “Coaches”.

Task 26: A Simple SOAP Web Service

8 points

In this exercise you will implement your own simple SOAP Web Service and Client with Java. We use the Java API for XML - Web Services (JAX-WS) which is included in Java SDK 6 as it provides a fast way of getting started. A short introduction on how to implement Web Services and corresponding clients with JAX-WS can be found at the Practical Lecture.

a.) Analogous to the calculator example of the Practical Lecture implement a simple SOAP Web Service in Java that satisfies the following extract of a WSDL declaration:

<message name="randomNumber">
  <part name="lowerBound" type="xsd:int"/>
  <part name="upperBound" type="xsd:int"/>
<message name="randomNumberResponse">
  <part name="return" type="xsd:int"/>

<portType name="RandomNumberGenerator">
  <operation name="randomNumber" parameterOrder="lowerBound upperBound">
     Returns a random number between given the lower and upper bound.
    <input message="tns:randomNumber"/>
    <output message="tns:randomNumberResponse"/>

b.) Implement a corresponding client that uses your Web Service to simulate the lottery drawing by requesting six random numbers between 1 and 49.

Task 27: Advanced Web Service & Service Composition (Optional)

[12 points]

In this exercise you will combine two existing Web Services to build an advanced Web Service. For this purpose we use the WSDL declaration to automatically generate client stubs for accessing the corresponding Web Service.

a.) Use the “wsimport” tool of JAX-WS to automatically generate client stubs for the global weather Web Service and the FIFA WM 2010 Web Service of tasks 24 and 25.

b.) Implement a Web Service that provides the following two operations:

  1. cardsOfTeam: Return for all players of a given team the number of yellow and red cards.
  2. weatherOfWMCities: Return the current weather for the cities of the FIFA World Cup 2010. (Hint: First request all WM cities using the WM service. Unfortunately, the weather service will not find all of these cities.)

teaching/lectures/atsc/2012/assignment_6.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024