Download Web Services and Cloud - Homework

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL redirection wikipedia , lookup

Transcript
Homework: Web Services, SOA, SOAP, WSDL and REST
This document defines the homework assignments from the "Web Services and Cloud" Course @ Software
University. Please submit as homework a single zip / rar / 7z archive holding the solutions (source code) of all
below described problems.
Problem 1. Distance Calculator SOAP Service
Create a SOAP-based Web service (WCF Service Application in Visual Studio) for calculating distances between
points in the plane.
It should expose an endpoint "CalcDistance" taking two parameters: startPoint(x, y) and endPoint(x,
y). Use integer coordinates.
It should return as a result a single floating-point number.
The service should be consumable through the WCF Test Client (started with CTRL+F5).
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Follow us:
Page 1 of 3
Problem 2. Distance Calculator Client
Write a C# client to invoke the Distance calculator SOAP service. Use a Console application. Add a reference to the
service by entering its URI (you can get it from the WCF test client interface).
Create a new instance of the service. Invoke the desired method and print the results on the console. Make sure
you dispose the service at the end.
Problem 3. Distance Calculator REST Service
Write a RESTful Web service to calculate distance between points in the plane. It should take two points as input
(integer coordinates x and y) and return a JSON as a result (a single floating-point number).
Create an ASP.NET Web Application (Web API type). The endpoint should receive the parameters as query string
key-value separated pairs. The service should be accessible with Postman and should yield the following result:
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Follow us:
Page 2 of 3
Problem 4. Distance Calculator REST Client
Write a C# client to programmatically invoke the Distance calculator REST service. Use external REST library like
RestSharp (http://restsharp.org) or the built-in .NET classes like WebClient, HttpClient or HttpWebRequest.
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
Follow us:
Page 3 of 3