Chad Sample Guide
INTRODUCTION
Chad is a simple voting service. It has two perspectives; a user
perspective & an administration perspective. The user perspective is the
default one, which allows a user to vote for a particular poll, as well as
view the results of a poll. In addition, in the administration perspective,
an authorized administrator can;
- 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,
also including the line, "We have already received a vote for this poll from
your IP address. Hence you are not eligible for voting" below the results
graph.
DEFINITIONS
- WSO2WSAS_HOME : Directory to which you installed WSO2 WSAS.
- MGT_CONSOLE_URL : This is the URL that will be used to access the
management console. This will be https://127.0.0.1:9443/ in the case of
the standalone distribution and https://127.0.0.1:9443/wso2wsas in the
case of the embedded distribution (assuming WSO2 WSAS default
configuration parameters). This can vary depending on your installation
type and the configuration.
- CHAD_URL : This URL is used to open the CHAD GUI Application. This will
be http://127.0.0.1:9762/wservices/Chad for the standalone server of
WSAS and http://127.0.0.1:9762/wso2wsas/wservices/Chad for the
servlet.
DEPLOYING THE CHAD SERVICE
To build the samples you need the
Apache
Ant
build tool.
- First install WSO2 WSAS (See
Installation Guide for details).
- In the command prompt go to
WSO2WSAS_HOME/samples/Chad
- Type
ant
at the command prompt.
- Execute the WSO2 WSAS starting script.
- Check your WSO2 WSAS instance using this URL https://localhost:9443
Now you will have the Chad service deployed on WSO2 WSAS. You can check
this by going to the
AJAX based Management Console
and clicking on the "Manage Services" link on
the left menu. If you see the Chad service listed here, then you know for
sure that Chad is active/deployed.
RUNNING THE WEB BASED CHAD CLIENT
You can run the client using a Web browser interface.
- Run the WSO2 WSAS Server (See
Installation Guide
for instructions on installation)
- Go to CHAD_URL (e.g. http://127.0.0.1:9762/wservices/Chad for the
standalone server and http://127.0.0.1:9762/wso2wsas/wservices/Chad for
the servlet)
or
You can got to the WSO2 WSAS Management Console, sign in,
then click on "Manage Services" link on the left menu. As Chad service is
already deployed you will see the service listed on the page. Click on
"Chad" service link and you will go to a "Service Management" page of
Chad. You should be able to see a sub menu titled "Application GUI" here.
This sub menu will take you to the Web based UI of the Chad application.
(See User Guide for details for details)
- Now you will see the user view of the Chad system as shown below. If
there are no Active polls, then the page will read as "There are no
active polls". An active poll is a poll open for voting. A normal user
can vote using the "Vote" action. He can also see
poll results by clicking on the particular poll title.
- Do an Administrator Login with the given default username and password
to have access to administrator privileges to the Chad system. Once
logged in as Admin you will have access to the following features
APPENDIX