Java Reference
In-Depth Information
The
dukes-payment
Project
The
dukes-payment
project is a web project that holds a simple
Payment
web ser-
vice. Since this is an example application, it does not obtain any real credit information
or even customer status to validate the payment. For now, the only rule imposed by the
payment system is to deny all orders above $1,000. This application illustrates a common
scenario where a third-party payment service is used to validate credit cards or bank pay-
ments.
The project uses HTTP Basic Authentication and JAAS (Java Authentication and Author-
ization Service) to authenticate a customer to a JAX-WS web service. The implementation
itself exposes a simple method,
processPayment
, which receives an
OrderEvent
to
evaluate and approve or deny the order payment. The method is called from the checkout
process of Duke's Store.
The
dukes-resources
Project
The
dukes-resources
project contains a number of files used by both Duke's Store
and Duke's Shipment, bundled into a JAR file placed in the classpath. The resources are
in the
src/META-INF/resources
directory:
The Duke's Store Project
Duke's Store, a web application, is the core application of Duke's Forest. It is responsible
for the main store interface for customers as well as the administration interface.
The main interface of Duke's Store allows the user to perform the following tasks:
• Browsing the product catalog
• Signing up as a new customer
• Adding products to the shopping cart
• Checking out
• Viewing order status
The administration interface of Duke's Store allows administrators to perform the follow-
ing tasks: