WHAT'S IN THIS CHAPTER?
Defining requirements for the case
Developing the complete solution
Testing the solution
This chapter is an interactive walkthrough of how to create a solution in SOA architecture with Visual Studio 2010 using WCF. It starts by defining requirements for a case and shows you how to develop the solution, step by step. At the end of this chapter you will have developed a number of services, hosts, and clients as part of the solution. This is a complete example — you can test the process and see it working in action.
You need to create services for a car rental company. The company needs a service for managing their fleet of cars, a service to register their customers, and a service to register the rentals.
These three services are considered internal and will be used by their own applications.
Besides these services, they also need an external service accessible by partners of the company that can insert a customer and register a rental with one call.
Operations for the
InsertNewCar: Receives the data for a car and inserts it into a database.
RemoveCar: Receives the ID of a car and deletes it from the database.
UpdateMileage: Receives the data for a car and updates the mileage for the car in the database.
ListCars: Returns all cars with their data.
GetCarPicture: Returns a picture for the car with a specified ID.
Operations in the
RegisterCustomer: Receives the data for a customer ...