SDA SE Wiki

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

User Tools

Site Tools


Assignment 05: SOA

Release date: Monday 18.11.13 - Due date: Sunday, 24.11.13, 23:59


Task 26: WSDL Styles

2 points

Read the following article on the different WSDL styles:

http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

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


Task 27: REST

4 points

Consider the WSDL declaration for a global weather Web Service:

http://www.webservicex.net/globalweather.asmx?wsdl 

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

http://www.webservicex.net/globalweather.asmx/GetWeather?CityName=Bonn&CountryName=Germany

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 28: SOAP

12 points

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

http://footballpool.dataaccess.eu/data/info.wso?wsdl

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 29: 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

a.) Analogous to the calculator example 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>
<message name="randomNumberResponse">
  <part name="return" type="xsd:int"/>
</message>

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

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 30: 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 27 and 28.

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/2013/assignment_05.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2025