Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

This sample is a combination of a web app and Axis2 sample, and it depicts the behavior of a simple voting system. It has two perspectives, which are namely a user perspective and an administration perspective.

...

  • Create new polls
  • Start polls (which have been stopped)
  • Stop polls (which are currently active)
  • Create accounts for new administrators

Only one vote per poll is allowed for a particular IP address and the poll results can be compared using the bar graphs and the relevant percentages of votes each choice has received. If you try voting again using the same IP, you will be directed to the poll results page that includes the message, "We have already received a vote for this poll from your IP address. Therefore, you are not eligible for voting" below the results graph.

Deploying the service

...

Building the sample

...

The polling station sample is located in <AS_HOME>/samples/\Samples\Chad directory.  

  The steps are as follows:

  1. Download the WSO2 Application Server. For instructions see, Downloading the Product.
  2. In a command prompt, switch to the samples directory.
    For example, in Windows: 

    Code Block
    cd <AS_HOME>\samples\Chad
  3. Enter the following command:

    Code Block
    ant
  4. Start the WSO2 Application Server by executing one of the following commands, where  <PRODUCT_HOME>  is the directory where you installed the product distribution:

    OSCommand
    On Windows
    <PRODUCT_HOME>\bin\wso2server.bat --run
    On Linux/Solaris
    sh <PRODUCT_HOME>/bin/wso2server.sh

    For more information, see Building Axis2 Samples.

    Anchor
    5-6
    5-6

  5. Check the WSO2 Application Server instance using this URL: https://localhost:9443/carbon 
    You now have the Chad service deployed on WSO2 Application Server.

  6. On the Main menu, under Services, click List.
    The Deployed Services page will appear with the Chad service listed as deployed.

Running the web-based client

  1. Start the WSO2 Application Server if it is not running and ensure that the Chad service is running as explained in steps 5 2 & 63 above.
  2. To run the chad client visit http://localhost:9763/Chad. This is the web-based UI of chad application.

    Info

    Using Mozilla Firefox is recommended when running this sample.

  3. The user view of the Chad system appears.

...