ZiBaT => Peter Levinsky => Programming => exercise

SOAP
Create you own SOAP-service
- part3

Updated : 2016-09-13

Exercise: Create your own SOAP based web services - Part 3

Mission:

To design and implement your own SOAP service using your own defined classes.
You should be able to receive information from a sensor and store the information and in addition retreive them.

Precondition:

The exercise Create you own SOAP-service part2

Exercise A: create soap service

A sensor are sending information of SensorData (light (byte), temperature (byte), timestamp (string)).

The timestamp is of format: 'YYYY-MM-DD-hh-mm-ss'

Make a service that can store these information and retrieve part of the information.
I.e. the service should have these methods:

// Store the data in some datastructures at the server
void StoreData(Sensor sensor);

// Get all the data as a list
List<Sensor> GetAllData();

// Get all data from a specific timestamp (included) and until now
List<Sensor> GetDataFrom(String FromTimestamp)

// Get all data from a specific timestamp (included) and until a specific timestamp(included)
List<Sensor> GetDataFromTo(String FromTimestamp, String ToTimestamp)

Exercise B: Test the soap service

Make a unit test of the service-class.

Exercise C: create a Consumer to use the service

Create a program to use this service (could be a console program or an app).

Additional Extra : Use a DataBase to store the information

Use a database for the sensor information instead of some collection.

 

.