Tuscany SCA Native Samples - PythonWeatherForecast Sample
This is a very simple sample to show how an SCA composite can wire
together two components to implement calls to a Weather Forecast web service.
The PythonWeatherForecast sample requires the following extensions:
Please follow the documentation to ensure you have these extensions built and installed
on your system
There are two sub projects in this workspace:
- sample.weather
This contains the source code and SCDL artifacts for the SCA Weather
composite implementing the calls to the Weather web services.
- sample.weather.client
A sample client which does a local call to the SCA Weather service.
Additionally, there is the sample.weather.app.composite file. This
describes the configuration of the SCA Weather composite deployed to the SCA
runtime.
Building the PythonWeatherForecast sample on Linux and Mac OS X
If using the binary distribution the samples are built and installed in
<tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux and Mac OS X.
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- As the PythonWeatherForecast sample is based on Python scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the Python samples only with the following command sequence:
- cd <tuscany_sca_install_dir>/samples
- ./configure --enable-python --enable-cpp=no --prefix=$TUSCANY_SCACPP/samples
- make install
NOTE: If you don't provide the --prefix configure option, it will by default install into
/usr/local/tuscany/sca/samples/PythonWeatherForecast
Running the PythonWeatherForecast sample on Linux and Mac OS X
- The PythonWeatherForecast sample requires the following extensions:
Please follow the documentation to ensure you have these extensions built and installed
on your system
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to Axis2/C version 0.96>
- PYTHON_LIB=<path to the Python library>
Note: If you are using a default installation of Python 2.5 this is usually /usr/lib
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/PythonWeatherForecast/deploy/sample.weather.client
- ./runclient.sh
Building the PythonWeatherForecast sample on Windows
If using the binary distribution the samples are built and installed in
<tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- As this sample is based on Python scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the sample with the following commands:
- cd <tuscany_sca_install_dir>\samples\PythonWeatherForecast
- deploy.bat
Running the PythonWeatherForecast sample on Windows
- The PythonWeatherForecast sample requires the following extensions:
Please follow the documentation to ensure you have these extensions built and installed
on your system
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to Axis2/C version 0.96>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>\samples\PythonWeatherForecast\deploy\sample.weather.client
- runclient.bat