Java Reference
In-Depth Information
listener loads the beans defined in WEB-INF/applicationContext.xml and binds them to the
root application context associated with the web application. Listing 5-33 shows this.
Listing 5-33. applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
<bean name="policyQuoteApplicationService" class="com.apress.einsure. å
business.impl.PolicyQuoteApplicationServiceImpl" />
Finally, Listing 5-34 shows the actual application service implementation class.
Listing 5-34.
public class PolicyQuoteApplicationServiceImpl implements
public double calculatePolicyQuote(String productCd, int age,
double sumAssured, int term) {
//return calculated policy value
Now that the server-side components are ready, I will show how to build a sample
client to access the web service. As explained in Chapter 4, I will use a business delegate
because it is the most appropriate component to deal with remote services. Listing 5-35
shows the business delegate to invoke methods on the remote policy quote service.
Search WWH ::

Custom Search