This distribution contains the WSDL for the alpha Opal Web service, and a sample Python client that invokes a Babel service that has been deployed via Opal. Before proceeding with the client installation, please read the documentation for the Opal Web service implementation, and deploy the Babel service via Opal.
The Python client should work on both Unix and Windows platforms as long as you have the following packages installed.
python setup.py build python setup.py install
python setup.py install
Note the location where the ZSI package is installed. In particular, note the location of the wsdl2py.py script that we need to use in the future. Typically, the packages are installed inside the Python installation. On Windows, wsdl2py.py typically resides inside $PYTHON_HOME/scripts, where PYTHON_HOME represents the location of the Python installation. On Unix, it is usually inside $PYTHON_HOME/bin.
1. Download the source distribution for installation from here, if you don’t have the appropriate version already.
Expand the tarball that you have downloaded using the GNU tar utility, as follows:
tar zxvf opal-py-1.5.1.tar.gz
This should create a new directory called opal-py-1.5.1/ where all the sources are expanded. Henceforth, we will call this directory OPAL_PY_HOME.
2. Generate the stubs from the WSDL file with the following command inside the $OPAL_PY_HOME directory:
python <prefix_to_wsdl2py>/wsdl2py.py -f opal.wsdl
Replace prefix_to_wsdl2py with the location of wsdl2py.py on your local installation. This generates two files – AppService_services.py and AppService_services_types.py. The former contains the stubs required to communicate with the remote Web service, while the latter contains the types defined in the WSDL for the service.
A sample Opal client is provided in BabelClient.py. It shows how to retrieve a reference to a remote Web service port, set parameters, and invoke remote operations. To launch the remote Babel service, the argument string (-ipdb benzene.pdb -h -opdb output.pdb) and the list of input files (benzene.pdb) are sent over. The service returns a jobID that is used later to query for status and retrieve locations of the output files. Alternatively, the service can also be invoked in a blocking fashion, where the client blocks until the remote execution is complete, and the outputs are returned as a response to the same invocation.
To run the client, you can run the following command from inside the $OPAL_PY_HOME directory.
python BabelClient.py
By default, the client uses the Web service running on http://localhost:8080. To change this location, modify the URL inside BabelClient.py.
The Opal Web service can be optionally set up to accept connections using GSI-based HTTPS (refer to the security documentation for instructions). In the future versions, non-secure connections using HTTP will be disabled. The following snippet shows how to set up a GSI-based connection to the Web service.
appServicePort = appLocator.getAppServicePortType(
baseURL + "axis/services/BabelServicePort",
ssl=1,
# if you are using a proxy cert, set both the cert_file
# and key_file to the location of the proxy
# cert_file="/tmp/x509up_u506",
# key_file = "/tmp/x509up_u506",
cert_file="/Users/sriramkrishnan/certs/opal_service.cert.pem",
key_file="/Users/sriramkrishnan/certs/opal_service.privkey",
transport=httplib.HTTPSConnection)
Note that if you are using proxy certificates, they have to be RFC 3820 compliant. This can be done by creating a Grid proxy using grid-proxy-init -rfc (only works for Globus Toolkit 4.0.x). This has only been tested with OpenSSL version 0.9.7g, and may not work with older versions.
To report bugs and feature requests, please use the NBCR Web Services User Forum (WSUF).