Java TM Web Services WS-I Supply Chain Management Sample Application 1.0


 Samples Index WS-I Member Logo



WS-I Supply Chain Management Sample Application 1.0


This document describes Java TM WS-I Supply Chain Management Sample Application 1.0 as deployed  in the Sun Java System Application Server  Platform Edition 8.

This  document contains the following sections:

1.0 Introduction
2.0 Directory Structure
3.0 Pre-Requisites
4.0 Invoking the service
5.0 Building from the source
6.0 Configuring Logging
7.0 Troubleshooting
8.0 References


1.0 Introduction

This document explains the Sun's early access implementation of WS-I Sample Supply Chain Management Application.

The Web Services Interoperability (WS-I) Organization [1] is an organization committed to promoting interoperability among Web Services based on common, industry accepted definitions and related XML standards support. Towards this end, the WS-I organization is producing a set of deliverables that is intended to assist developers in creating and deploying interoperable Web Services.  WS-I Sample Application, one of the deliverables from WS-I, demonstrates the reality of practical application of Web Services technologies to solve real business needs.

WS-I Sample Application is defined as a sample Supply Chain Management application. The use case design of this sample application is defined in Supply Chain Management Use Case Model [2]. Technical design and implementation details of this sample application are documented in Supply Chain Management Architecture document [3].

The application being modeled is that of a Retailer offering consumer electronic goods to Consumers; a typical B2C model. To fulfill orders, the Retailer has to manage stock levels in Warehouses. When an item in stock falls below a certain threshold, the Retailer must restock the item from the relevant Manufacturer's inventory; a typical B2B model. In order to fulfill a Retailer's request, a Manufacturer may have to execute a production run to build the finished goods. In the real world, a Manufacturer would have to order the component parts from its suppliers. For simplicity in this application, it is assumed this is a manual process which is supported through the use of fax. Each use case includes a logging call to a logging facility in order to monitor the activities of the services.

Optionally, there is a Configurator Web Service that lists all of the implementations registered in the UDDI registry for each of the Web Services in the sample application.

There is 1 Retailer, 1 Logging Facility, 3 Warehouses, 3 Manufacturers and 1 Configurator, and thus a total of 9 Web Services.

This document explains the Sun's implementation of WS-I Sample Supply Chain Management Application.


2.0 Directory Structure

This section explains the directory structure

docs 

 HTML Documentation

config 

 Configuration files required by JAX-RPC tools

config/scm/wsdl 

 WSDL descriptions for the Web Services

src

 Source files

wsi.war

 WAR file with all the Web Service endpoints

logs

 SOAP request and response message files and generated results

3.0 Pre-Requisites

Before any of the sample app Web Service can be invoked, you need to ensure

<jvm-options>-Dhttp.proxyHost=webcache.sfbay.sun.com</jvm-options>
<jvm-options>-Dhttp.proxyPort=8080</jvm-options>

Once the database is running, you need to create a database with the URL "jdbc:pointbase:server://localhost:9092/wsi" by invoking the INSTALL_ROOT/pointbase/tool/serveroptions/startconsole.[sh|bat] script of the pointbase server bundled with the application server. 


4.0 Invoking the service

Make sure the application server is up and running before invoking any of the services.

4.1 Invoking the Retailer client

Retailer client acts as a consumer of the electronics good and places pre-defined orders (defined in config/order-config.xml) to the Retailer Web Service. Retailer Web Service then invokes the warehouse and manufacturer Web Service to fulfill the supply chain model defined in section 1.0 above. The orders are defined such that the various combinations of retailer, warehouse and manufacturer are being invoked. The set of endpoints is defined in config/endpoints.props and the combination of endpoints is defined in config/vendor-config.xml.

4.2 Invoking the Configurator client

The Configurator client queries a public UDDI Business Registry for the WS-I sample application endpoints implemented by all the vendors which have a peer-to-peer relationship with WS-I business entity and displays them.
// Permissions for JAXR
grant codeBase "file:${com.sun.aas.installRoot}/lib/jaxr-impl.jar" {
        permission java.security.AllPermission;
};

Specifying this option will not invoke the public UDDI business registry and instead provide you with endpoints information from local cache. This cache is also updated every time UDDI registry is contacted for getting the list of endpoints.
5.0 Building from the source


6.0 Configuring Logging

The WSI sample application supports the Java Logging API [4]. By default, the logging level has been set to "INFO". The following levels are available, in ascending order of granularity and are used in the application as shown below.
Logging Level Usage
SEVERE Server-side or client-side exception
WARNING Non blocking error conditions
INFO (default) Basic flow of application
CONFIG Logging entries from LoggingFacility
FINE SOAP request and response messages
FINER Entry and exit points of primary methods
FINEST Display intermediate steps from the primary methods, if any

You can change the default level of logging for the sample application on the client and server side as follows: 

7.0 Troubleshooting

  1. All the endpoints are configured in the config/endpoints.props file. The default endpoints are configured for host "localhost" and port "8080". If your application is deployed at a different port, then ensure that these are reflected correctly in  config/endpoints.props.
  2. Make sure the database server is started before invoking the Retailer client (asant run-retailer). 
  3. Make sure the database server is running on the correct host and port and the appropriate database has already been created. Refer to section 3.0 for more details.
  4. Database related properties are stored in wsi-server.war{WEB-INF/conf/db.props} file. If your database server is running at a different port, change db.url property accordingly. The format of the database URL is "jdbc:pointbase:server://localhost:{port}/wsi" where {port} may not be specified if it is the default port. By default, port is set to 9092
  5. If your Retailer endpoint is outside the firewall, you need to change the http.proxyHost and http.proxyPort properties in config/build.properties to the proxy host name and port number entries so that they specify the system on your network through which you access the Internet.
  6. You can specify sample application endpoints from other vendors in config/endpoints.props and create different configurations, comprising of endpoints from different vendors, in config/vendor-config.xml.  Each of these configurations will be used to place the orders specified in config/order-config.xml. However if your endpoints are deployed inside firewall, then only Retailer Web Service hosted within the firewall can be mixed with other endpoints installed outside firewall.
  7. To view the SOAP request and response messages, turn the logging level to FINE. Refer to section 6.0 on how to configure logging. SOAP request and response messages are available for Retailer, Logging and Configurator clients as given below:
    • Retailer client SOAP request and response messages are available in logs/retailer-soap-messages.txt
    • Logging client SOAP request and response messages are available in logs/logging-soap-messages.txt.
    • Configurator client SOAP request and response messages are available in logs/configurator-soap-messages.txt.

    Server-side log messages are available in INSTALL_ROOT/domain/<domaim_name>/logs/server.log

8.0 References
  1. WS-I
  2. Supply Chain Management Sample Application 1.0 Use Case Model Board Approval Draft
  3. Supply Chain Management Sample Application 1.0 Architecture Board Approval Draft
  4. Java Logging APIs