Designing Document-Oriented Services: Design Details


The different strategies for designing a document-centric interface and endpoint are illustrated by the document-oriented applications available under the bpcatalog project hosted at java.net. There are five web service applications to illustrate using different strategies for representing an XML documents in a service interface, and each application has a service endpoint that accepts a common purchase order document. Each endpoint is designed with a different interface and different endpoint implementation to handle the purchase order. In addition to the endpoints, there is a client application that accesses the endpoints.

This design document takes a very high level look at the five web service endpoint applications and the web application which acts as the client of the endpoints. The document also very briefly looks at the interactions among the applications. Because these applications are described more fully in other entries of the catalog, this document provides only a high level description.

First, let's briefly consider the client application, then we will examine the service endpoint applications.

Client Application

The client is a simple web application which acts as the client of the web service applications, and passes an XML purchase order to the deployed service. The client application is a very simple set of JSP pages and a servlet. The client GUI lets a user fill in a form for a purchase order and submit the form, which results in a purchase order XML document being created and sent to one of  the endpoints. The client allows the user to choose from different web services, each of which illustrates a different strategy for representing XML documents. Depending on the selection made by the client, the appropriate web service is invoked.

The other catalog entry, which covers a J2EE[TM] component acting as a client of a web service, covers the design of the client application in greater detail.

Web Service Applications

Let's briefly look at the services. Each application has a service interface and a service endpoint that receives a purchase order XML document. The applications are all similar, but they differ in the strategy for choosing a type to represent the XML document in the service interface. The design of the web service applications are explained in detail here:
The following table presents the WSDL associated with the services. Note that these WSDL files are also bundled with the client application code and can be found in the client application project workspace:

Document as a String
WSDL for the StringPurchaseOrderService
Document as a Schema-defined type
WSDL for the SchemaDefinedPurchaseOrderService
Document as xsd:anyType
WSDL for the AnyTypePurchaseOrderService
Document as a xsd:any
WSDL for the AnyPurchaseOrderService
Document as attachment
WSDL for the AttachmentPurchaseOrderService


© Sun Microsystems 2005. All of the material in The Java BluePrints Solutions Catalog is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.