Statistics SDK WS Examples
==========================
In the binary distribution of Statistics SDK WS Examples most samples can also 
be run using the provided Ant build.xml files. These show the samples running 
from a simple main() method without the need for a JUnit test case. 

These simple samples have been created with the intention of illustrating the 
usage of the Genesys Integration Server Statistic API

Examples Overview
-----------------
The samples generally show off different features of the Genesys Integration Server Statistic API.

ConnectSessionServiceExample.java		- A Simple Example demonstrating how to connect to Session Service
CreateSessionExample.java			- A Simple Example demonstrating how to create a GIS Session
IdentifyServicesExample.java			- A Simple Example demonstrating how to subscribe and retrieve list of services
RetrieveStatisticalProfileExample.java		- A Simple Example demonstrating how to retrieve Statistical Profiles
RetrieveStatisticExample.java			- A Simple Example demonstrating how to retrieve a Statistic
SubscribeToStatisticExample.java		- A Simple Example demonstrating how to subscribe a statistic
RetrieveSubscribedStatisticExample.java		- A Simple Example demonstrating how to retrieve an already subscribed statistic
UnsolicitedNotificationExample.java		- A Simple Example demonstrating how to implement unsolicited statistic notification mechanism
                    
Examples Layout
---------------
Statistics SDK WS Examples/        
	src/		- Holds all of the source files for all examples
	work/		- Holds all of the source files generated with Apach Axis Toolkit 1.4
	lib/		- Holds all the Third party libraries used in Examples
	bin/		- Classes directory
      

Getting Ready To Build
----------------------
You will need to install the following software before you start. 

J2SE Development Kit (JDK) 5.0
Apache Ant 1.7.0                - if you are going to use Ant 

Java and Ant directories must be present in your PATH so 
that their executable programs are available in your environment. You may 
find it useful to use a script to set up your environment, for example;

For UNIX:
  JAVA_HOME=/<installation_directory>
  ANT_HOME=/<installation_directory>/apache-ant-1.7.0
  export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH

For Windows:
  set JAVA_HOME=C:\<installation_directory>
  set ANT_HOME=C:\<installation_directory>\apache-ant-1.7.0
  set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%


Building And Running The Examples using Ant
-------------------------------------------
If you want to rebuild Examples, if you have changed it, do the
following:

ant compile

Once the Examples are built, you can modify Examples properties in gis.properties file.
	gis.host	- Host of the GIS (use the DNS name to avoid problem with notification mode)
	gis.port	- Port of the GIS
	client.notification.port	- Notification port on client side
	statistic.statserver.name	- Statistic Server name defined in GIS connections
	statistic.agentId	- Agent Id as defined in CME
	statistic.tenant	- Configuration Tenant

Once the Examples are built, you have the option of running each sample in whatever 
way best suits you. 

ant "Connect Session Service Example"		- A Simple Example demonstrating how to connect to Session Service
ant "Create Session Example"			- A Simple Example demonstrating how to create a GIS Session
ant "Identify Services Example"			- A Simple Example demonstrating how to subscribe and retrieve list of services
ant "Retrieve Statistical Profile Example"	- A Simple Example demonstrating how to retrieve Statistical Profiles
ant "Retrieve Statistic Example"		- A Simple Example demonstrating how to retrieve a Statistic
ant "Subscribe To Statistic Example"		- A Simple Example demonstrating how to subscribe/unsubscribe a statistic
ant "Retrieve Subscribed Statistic Example"	- A Simple Example demonstrating how to retrieve an already subscribed statistic
ant "Unsolicited Notification Example"		- A Simple Example demonstrating how to implement unsolicited statistic notification mechanism