Web Service provides an interface for publishing
the monitoring data and farm configuration
using a WSDL/SOAP technology. This way any client can connect and
receive selected data.
It is available in the MonALISA Service and in the Web Repository
(the Web Repository contains data gathered from several ML services).
The Web Service
was developed using
For a detailed description of the Web Service visit the
MonALISA Web Service
Deploying MonALISA as a Web Service
By default the Web Service will not be deployed when you start
Monitoring Service. If you wish
to start the Web Service
you need to set the following parameters in your ml.properties file:
You must then restart the MonALISA Service:
If you plan to access the Web Service from outside your firewall you must
open TCP port 6004 (or whatever port you have set above) for incoming
Once the Web Service is running try to access the following URL from
a web browser:
Web Service Clients
The MonALISA developers provide
Web Service Clients for accessing the monitored data either from
a MonALISA service or from a Web Repositoty. Three different types of
were developed: One based on
Apache AXIS, one on
Apache WSIF and one on
Perl SOAP:Lite modules.
All three clients are in a single tar file which can be
To deploy the clients download the latest tar file
(currently monalisaWSClients-1.0.1.tar.gz) on
the host from which you plan to access the MonALISA Web Service and
untar it. Go to the created monalisaWSClients directory
and run the script install.sh. It will prompt you for the
Web Service URL which will be
stored in a file ./conf/env.MONALISA_WS. This URL will be
used as the default Web Service URL by all clients. Running the
script will also create ./conf/env.JAVA_HOME.
In my case I have set:
[stratos@salonica monalisaWSClients]$ ./install.sh
Please enter the MonALISA Web Services URL : http://salonica.itd.bnl.gov:6004/axis/services/MLWebService
Configuration completed successfully.
You must then decide which clients to use. You have three choices:
The Java-Axis clients, the WSIF clients or the Perl SOAP::LITE clients.
Using the JAVA-AXIS Clients
To use the Java-Axis Clients go to WS-Clients/Java-Axis directory.
There you should find a couple of subdirectories,
each for a different operation (getValues, getConfiguration).
Go to one of them and run the generate_classes script:
The script generate_classes invokes the WSDL2Java utility
to access the WSDL file of the Web Service and create
the Java packages that are needed (under ./lia/ws/ and ./ws/lia/).
Then run compile_classes to compile the Java classes, including
the provided Client.java class:
You are now ready to run run_client (with the appropriate options)
to invoke the MonALISA Web Service. The availaible options for the
run_client script are listed in the Readme file, but basically
the format has as follows:
./run_client FarmUnit ClusterUnit Host Parameter FromTime ToTime
the FromTime and ToTime above are in milliseconds.
./run_client "bnl-itd" "Master" "localhost" "Load5" -600000 0
Use my version of the Java-Axis Client
Here I provide a Java class (myClient.java) which can be used instead
of the Client.java class provided by monalisaWSClients.tar.gz. To
download it click here: myClient.java
Using the Perl SOAP::Lite Clients
To use the Perl clients go to WS_Clients/Perl. The first thing you need to do
is install two Perl Modules SOAP::LITE and TIME::HIRES. Two scripts
install_soap_lite and install_time_hiref are provided
that will install these two modules. The scripts must be run by root.
You should then go to one of the subdirectories (getValues or
getConfiguration) and execute the perl script Client.pl
./Client.pl "bnl-itd" "Master" "localhost" "Load5" -600000 0
The arguments are the same with those used in the Java-Axis Clients.
Using the Java-Axis Clients on Windows
On a Windows machine, instead of running the script
generate_classes, you can invoke the WSDL2Java utility manually
(provided that you have Java and AXIS installed):
java -cp C:\axis-1_1\lib\axis.jar;C:\axis-1_1\lib\axis-ant.jar;
org.apache.axis.wsdl.WSDL2Java -v -o MonaLisa
Parsing XML file: http://salonica.itd.bnl.gov:6004/axis/services/MLWebService?w
The above creates the necessary Java packages under the directory MonaLisa
(the -o option).
Copy either Client.java or
in the MonaLisa directory, compile it
using javac and you are ready.
Current Issues with the MonALISA Web Service
I currently have the following two issues with the MonALISA Web Service
(I am using the version v1.0.1 of the MonALISA Service and version 1.0.1
of the Web Service Clients):
- The Web Service does not start if you are using a Web proxy and
you have set JAVA_OPTS="-Dhttp.proxyHost=192.168.1.3 -Dhttp.proxyPort=3128"
The above issue has been resolved as of version v1.0.6
- The Web Service Clients get null values for all properties of the
Result objects returned by the Web Service.
The above issue has been resolved as of version v1.0.2
Stratos Efstathiadis - page was last modified