Tuscany SCA Native Samples - REST Yahoo Search Sample
This is a very simple sample to show how to use the SCA REST binding to
invoke the Yahoo Web Search REST service.
The REST Yahoo Search 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.yahoo
This contains the SCDL artifacts and Python source code for the WebSearch
Component which calls a Reference that is configured to call the
Yahoo service
- sample.yahoo.client
A Ruby client which calls the WebSearch component
Additionally, there is the sample.yahoo.app.composite file. This
describes the configuration of the SCA Yahoo Search composite deployed to
the SCA runtime.
Building the Ruby & Python samples 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 REST Yahoo sample is based on Ruby and Python scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the Ruby and Python samples only with the following command sequence:
- cd <tuscany_sca_install_dir>/samples
- ./configure --enable-ruby --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/RestYahoo
Running the REST Yahoo Search sample on Linux and Mac OS X
- The REST Yahoo Search 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>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/RestYahoo/deploy/sample.yahoo.client
- ./runclient.sh
Building the REST Yahoo Search 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 Ruby and 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\RestYahoo
- deploy.bat
Running the REST Yahoo Search sample on Windows
- The REST Yahoo Search 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>
- LIBCURL_HOME=<path to libcurl>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>\samples\RestYahoo\deploy\sample.yahoo.client
- runclient.bat