62
Key Web Services Design Decisions
Exposes an interface that clients use to make requests to the service
Makes a service available to partners and interested clients by publishing the
service details
Receives requests from clients
Delegates received requests to appropriate business logic and processes the
requests
Formulates and sends a response for the request
Given this flow of logic, the following are the typical steps for designing a
Web service.
1. Decide on the interface for clients. Decide whether and how to publish this
interface.
You as the Web service developer start the design process by deciding on the
interface your service makes public to clients. The interface should reflect the
type and nature of the calls that clients will make to use the service. You should
consider the type of endpoints you want to use EJB service endpoints or
JAX RPC service endpoints and when to use them. You must also decide
whether you are going to use SOAP handlers. Last, but not least, since one rea
son for adding a Web service interface is to achieve interoperability, you must
ensure that your design decisions do not affect the interoperability of the ser
vice as a whole.
Next, you decide whether you want to publish the service interface, and, if so,
how to publish it. Publishing a service makes it available to clients. You can
restrict the service's availability to clients you have personally notified about
the service, or you can make your service completely public and register it with
a public registry. Note that it is not mandatory for you to publish details of your
service, especially when you design your service for trusted partners and do not
want to let others know about your service. Keep in mind, too, that restricting
service details to trusted partners does not by itself automatically ensure secu
rity. Effectively, you are making known the details about your service and its
access only to partners rather than the general public.
2. Determine how to receive and preprocess requests.
Once you've decided on the interface and, if needed, how to make it available,
you are ready to consider how to receive requests from clients. You need to de
sign your service to not only receive a call that a client has made, but also to
<
New Page 1
Web Hosting Apache