Instructions for PriceQuote sample Setup and Running 

  1. Download and install JDK 5.0 Update 2 or later (set the directory location to environment variable JAVA_HOME).
  2. Download and install GlassFish v2 (set the directory location to environment variable AS_HOME).
  3. Set the following environment variables:
  4. Edit $AS_HOME/domains/domain1/config/domains.xml, and add -DWSIT_HOME="Value of WSIT_HOME" as <jvm-options> under <java-config>.
  5. If you want to build WSIT from source, please Download, Build and Install WSIT into GlassFish. However, if you are reading this file, you might have already downloaded WSIT source code. In that case, skip to build and install steps.
    Note: If you are using a pre-built binary version of WSIT, you should install it into GlassFish following these instructions.
  6. Copy the strong encryption jars to $JAVA_HOME/jre/lib/security directory and required certificates using the following command:

    WSIT Source Users:
    $ANT_HOME/bin/ant setup-demo

    WSIT Binary Users:
    $ANT_HOME/bin/ant -Dlib.dir=/path/to/metro/lib setup-demo
  7. Start Glassfish default domain using the following command:

    $AS_HOME/bin/asadmin start-domain domain1
  8. Build and deploy the sample, in the sample directory (wsit/wsit/samples/pricequote), using the following command:

    WSIT Source Users:
    $ANT_HOME/bin/ant clean main

    WSIT Binary Users:
    $ANT_HOME/bin/ant -Dlib.dir=/path/to/metro/lib clean main
  9. Run the sample using the following command:

    WSIT Source Users:
    $ANT_HOME/bin/ant run

    WSIT Binary Users:
    $ANT_HOME/bin/ant -Dlib.dir=/path/to/metro/lib run

    If the sample is correctly deployed on the default host and port (localhost:8080) then all the endpoints can be viewed here.
  10. The console shows the quoted price and the name and location of the product image. If no exceptions are returned, then success. The console output looks like:

    Invoking endpoint address "http://localhost:8080/pricequote/retailer" for product id "10".
    Photo is copied to "C:\workspaces\wsit\wsit\samples\pricequote\BMW-M3-2k6.jpeg" file.
    Quoted price: 75640.0
    Success!

 

Troubleshooting

  1. Enable WS-Addressing Action header dump on the server side to understand the message flow. This can be done by adding <jvm-options> in domains.xml to set the following properties:

 

 

Last Updated: January 04, 2007 05:41:12 PM