Sun Java System Application Server 

Samples Index

The Order Processing Sample Application using Security with Trust

This is a little complex secure Web Service application. This sample demonstrates, how to :

Configuration

The build script is designed to be easily moved anywhere else and modified. To keep things as simple as possible it is not dependent on the build framework in the Samples hierarchy.

You do, however, have to setup some variables for Ant. The easiest way to do this is to add these variables to /build.properties (they are populated with sample values)

javaee.home=/as9
javaee.server.name=localhost
javaee.server.port=8080

How to use the build script

Building, Deploying, and Running the Application in NetBeans IDE

Follow these instructions to build, deploy, and run this sample application using NetBeans IDE.

  1. Refer to common build instructions. for setting up NetBeans IDE and the application server with which the IDE will use.
  2. Make usre that you have defined the appropriate values in build.properties based on above common build instructions which is a pre-requisite for this sample.
  3. In NetBeans IDE, select File->OpenProject and select samples_install_dir/javaee5/webservices/orderprocessing-xwss-trust as the project.
  4. Right click on orderprocessing-xwss-trust and select Run Project which will build, deploy and run the project. Sample output is given below.
  5.   CASE 1 : seller sells 1000 items of item code 123 & buyes places an order for 500 item of item code 123. 

    Feedback : Seller's request is successfully completed !.

    Total number of items is 1000 for the item code x123

    Feedback : Buyer's request is successfully completed !

    CASE 2 : buyes places an order for 600 item of item code 123

    Feedback : No sufficient stock of reqested item !!

    Request for 600 items but items available in stock : 500

    run-client:
    BUILD SUCCESSFUL (total time: 20 seconds)

For more details

  1. Refer to WSIT Tutorial (chapter 6 and 7) at https://wsit-docs.dev.java.net/releases/m4/index.html
  2. Refer to http://blog.sun.com/shyamrao
  3. Refer to http://blogs.sun.com/harsha/
  4. Refer to http://blogs.sun.com/trustjdg/