WS-I Supply Chain Management Sample Application 1.0WS-I Member Logo

The latest updates to this document are in the online documentation posted on our web site.

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

The Web Services Interoperability Organization (WS-I) [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

bin 

 Scripts to invoke the retailer and configurator clients

docs 

 index.html

etc/config 

 Configuration files required by JAX-RPC tools

etc/wsdl 

 WSDL descriptions for the Web Services

lib 

 Supporting jar files

src 

 Source code

wsi-server.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

Once the database is running, you need to create a database with the URL "jdbc:pointbase:server://localhost/wsi" by invoking startconsole.[sh | bat] script bundled with pointbase release. At the time of JWSDP 1.3 release going public, pointbase 4.6 is the latest version available on www.pointbase.com. Database creation instructions may differ for a later pointbase release.

4.0 Invoking the service

Make sure Tomcat 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 etc/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 etc/endpoints.props and the combination of endpoints is defined in etc/vendor-config.xml.

4.2 Invoking the Configurator client

Configurator client queries a public UDDI Business Registry for the WS-I sample app endpoints implemented by all the vendors which have a peer-to-peer relationship with WS-I business entity and displays them.

5.0 Building from the source

Specify HTTP proxy host (http.proxyHost) and port (http.proxyPort) properties in JWSDP_HOME/conf/jwsdp.properties before building from the source. Also, make sure Tomcat is not running before invoking either of these commands.

6.0 Configuring Logging

The Java WSDP supports the Java Logging API [4]. By default, the sample app in the Java WSDP has it's  logging level 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 app on the client and server side as follows: 

7.0 Troubleshooting

  1. All the endpoints are configured in etc/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 etc/endpoints.props.
  2. Make sure database server is started before run-retailer script is invoked. If database is started after the script is invoked, you need to restart the JWSDP container.
  3. Make sure database is running on the correct host and port and 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.
  5. If any of the sample app endpoints is outside firewall, you need to specify http.proxyHost and http.proxyPort properties in JWSDP_HOME/conf/jwsdp.properties so that they specify the system on your network through which you access the Internet.
  6. You can specify sample app endpoints from other vendors in etc/endpoints.props and create different configurations, comprising of endpoints from different vendors, in etc/vendor-config.xml.  Each of these configurations will be used to place the orders specified in etc/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:

    Server-side log messages are available in JWSDP_HOME/logs.

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