Designing a Service's Interaction Layer
A Web service such as this can be designed using a service endpoint that
receives the client's request and then delegates the request directly to the service's
appropriate logic in the processing layer. The service's processing layer processes
the request and, when the processing completes, the service endpoint returns the
response to the client. (See Figure 3.6.)
Code Example 3.15 shows the weather service interface performing some
basic parameter validation checks in the interaction layer. The interface also gets
required information and passes that information to the client in a synchronous
public class WeatherServiceImpl implements 
WeatherService, ServiceLifecycle {
public void init(Object context) throws JAXRPCException {....}
public String getWeather(String city)
throws CityNotFoundException {
/** Validate parameters **/
throw new CityNotFoundException(....);
/** Get weather info form processing layer and **/
/ **return results **/
return (getWeatherInfoFromDataSource(city));
public void destroy() {....}
Code Example 3.15
Performing a Synchronous Client Interaction
Now let's examine an asynchronous interaction between a client and a ser 
vice. When making a request for this type of service, the client cannot afford to
wait for the response because of the significant time it takes for the service to
process the request completely. Instead, the client may want to continue with
some other processing. Later, when it receives the response, the client resumes
whatever processing initiated the service request. Typically in these types of ser 

New Page 1

Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service


Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting


Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Web Hosting Apache