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.

  1. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  2. 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
    • 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

  1. 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
  2. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  3. 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.

  1. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  2. 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

  1. 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
  2. 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>
  3. Run the sample with the following commands:
    • cd <tuscany_sca_install_dir>\samples\RestYahoo\deploy\sample.yahoo.client
    • runclient.bat

Getting Help

First place to look is at the Tuscany FAQ at http://incubator.apache.org/tuscany/faq.html

Any problem with this release can be reported to the Tuscany mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.