Building the samples

The samples have been built using java and WebSphere tools. Before building the Enterprise Console Feature Option 1 samples, you must first install all the prerequisite software and set up your environment for access to all of the required class libraries. These include the WebSphere libraries and the Hyades logging toolkit libraries. Open the file samples/was/sample-was.properties and modify them as follows:

WAS_PATH=was_directory

Replace was_jars_directory with the name of the directory containing WebSphere Application Server path.For example, in windows it will be C:\Program Files\IBM\WebSphere\AppServer.

SERVICE_ADDRESS=NotificationConsumerService_URL

Replace NotificationConsumerService_URL with the URL of the Enterprise Console Web Services receiving events in CBE format.

WebSphere provides a tool called WSDL2Java which generates java classes from wsdl. The wsdl2java genarates java classes for data formats and client side stubs for accessing Web Services from Web Services specifications
The WSDL2Java tool can be invoked through an ant task. The build.xml file in the samples directory of the SDK contains ant tasks for building the sample. To build the samples, perform the following steps.

    1. set JAVA_HOME=<location of jdk>
    2. set ANT_HOME=<location of ant installation>
    3. cd <location of sdk installation>\samples\wsnt-was
    4. %ANT_HOME%\bin\ant -propertyfile sample-was.properties
    1. export JAVA_HOME=<location of jdk>
    2. export ANT_HOME=<location of ant installation>
    3. cd <location of sdk installation>/samples/wsnt-was
    4. $ANT_HOME/bin/ant -propertyfile sample-was.properties

The Java class files will be generated from the wsdl file and placed in the wsnt-was/samples/src directory. They will be compiled into directory samples/build/classes. A jar file called wsnt-was-samples.jar of the classes is created in wsnt-was/samples/build/lib directory.

Note: When you build the sample some errors and warnings will be display on the screen. This is expected, the generated classes that have problems will be deleted by the build.xml file.