Chapter 3. Service Endpoint Design

Web services interact with clients to receive the clients' requests and return responses. In between the request and the response, a Web service applies appropriate business logic to process and fulfill a client's request. Designing an effective Web service starts with understanding the nature of the service to be provided—that is, how the service is going to interact with the client and how it is going to process and fulfill the client's request—coupled with how users of the service find and make their requests. This chapter examines Web services from the perspective of a service's interaction and processing functionality.

The chapter describes the key issues you must consider when designing a Web service, then shows how these considerations drive the design and implementation of a service's Web service interface and functionality. In particular, the chapter examines the interactions between a service and its clients and the business processing that the service performs. It illustrates these considerations by drawing from examples using three typical Web service scenarios.

The chapter covers most of the decisions that must be made when designing and implementing a Web service, including identifying the different possibilities that give rise to different solutions. It describes how to receive requests, delegate requests to business logic, formulate responses, publish a Web service, and handle document-based interactions.

Along the way, the chapter makes recommendations and offers some guidelines for designing a Web service. These recommendations and key points, marked with check boxes, include discussions of justifications and trade-offs. They are illustrated with the example service scenarios. Since Web services basically expose interoperable interfaces for new as well as existing applications, a large segment of the audience of this book may have existing applications for which they have already implemented the business logic. For that reason, and since the primary interest of most readers is on Web services, this chapter keeps its focus on Web service development and does not delve into the details of designing and implementing business logic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset