Getting Started with the SDO C++ Milestone Release 1

If you haven't already done so, the first step is to download the SDO C++ Milestone release 1 of Apache Tuscany from our sdo downloads page.

System Requirements

In order to use Tuscany SDO there are some minimum requirements:

Software Download Link
Operating systems:
  • Windows XP SP2
  • Linux
Axis2C Release 0.92 http://ws.apache.org/axis2/c/download.cgi
Please download and follow the installation instructions. Ensure you can run the Axis2C samples
libxml2 version 2.6.20 http://xmlsoft.org/downloads.html
Most Linux systems have libxml2 by default. On Windows you need to download and install libxml2 from http://www.zlatkovic.com/libxml.en.html
Please read the installation notes for libxml2 particularly regarding it's pre-req's iconv and zlib on Windows.
These libraries will need to be on the PATH in order to run Tuscany SDO.

Installing Tuscany SDO for C++

Getting Tuscany SDO for C++ working with the binary release on Linux

  1. Extract the binary tar package to a folder
  2. Add the *install_dir*/lib directory to the LD_LIBRARY_PATH environment variable

Getting Tuscany SDO for C++ working with the source release on Linux

  1. Extract the source tar package to a folder <tuscany_sdo>
  2. The following environment variables are required:
    • LIBXML2_INCLUDE=<path to libxml2 includes>
    • LIBXML2_LIB=<path to libxml2 lib>
      Note: If you are using the default installation of libxml2 these are usually:
      LIBXML2_LIB=/usr/lib
      LIBXML2_INCLUDE=/usr/include/libxml2
    • AXIS2C_HOME=<path to axis2c version 0.92>
  3. Build the source with the following command sequence:
    • ./configure
    • make
    • make install
    NOTE: If you don't provide a --prefix configure option, it will by default install into /usr/local/tuscany/sdo
  4. Run the test:
    • cd to <tuscany_sdo>/runtime/core/test
    • ./tuscany_sdo_test

Getting Tuscany SDO for C++ working with the binary release on Windows

  1. Unzip the supplied zip file to a folder
  2. Add the *install_dir*\bin directory to the PATH environment variable

Getting Tuscany SDO for C++ working with the source release on Windows

  1. Unzip the supplied source zip file
  2. The following environment variables are required:
    • LIBXML2_HOME=<path to installed libxml2>
    • AXIS2C_HOME=<path to axis2c version 0.92>
  3. You must have set up the environment for Microsoft Visual C++ tools. The build command will call vcvars32 to set the environment. Ensure the directory containing this is on your path. This will be where you installed the compiler.
  4. Build the source:
    • cd <to where you unzipped the source>
    • build
    This will build all the projects and put the required output into the 'deploy' directory

    Alternatively, open the workspace tuscany_sdo.dsw in Visual Studio 6 - you can build projects individually or build the test project to build all its dependencies. Running the test project should give a list of tests passed - this is currently 108 tests, no failures.
  5. Add the 'deploy'\bin directory PATH environment variable

Samples

Tuscany SDO C++ includes some simple technology samples that demonstrate some of the basic sceanrios for C++ SDO. This page describes the samples and what is needed to install and run them.

  • The ObjectCreation sample demonstrates building the metadata programmatically, followed by use of the metadata to instantiate objects in a graph.
  • The XSDLoading sample shows how to load metadata from an XSD, and how to check for errors during parsing. The parser gathers all non-fatal errors into one list, so all errors can be checked at one time after parsing. Elements which contained errors will have been omitted from the resulting metadata.
  • The ChangeSummarySave sample modifies a data graph of employees, and saves the modified graph with its change summary. The output in ChangeSummarySave-output.xml shows the summary and its relationship by references to the data graph.
  • The Substitutes sample shows how to use substitites in XSD to achieve a property which will accept a range of types.
  • The Query sample shows how to use XPath to navigate within a graph to the required element. Note that exceptions such as "path not found" may well be thrown if the XPath specified does not lead to a real object in the graph.

The SDO samples are built together into a single executable called sdo_misc.exe on Windows and sdo_misc on Linux

Building the samples on Linux

If using the binary distribution the samples are built and installed in <tuscany_sdo_install_dir>/samples - go directly to Running the samples on Linux.

  1. The following environment variables are required:
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • AXIS2C_HOME=<path to axis2c version 0.92>
  2. Build the source with the following command sequence:
    • cd <tuscany_sdo_install_dir>/samples
    • ./configure
    • make
    • make install
    NOTE: If you don't provide a --prefix configure option, it will by default install into /usr/local/tuscany/sdo/samples/misc

Running the samples on Linux

  1. Ensure that <tuscany_sdo_install_dir>/lib is included in the LD_LIBRARY_PATH environment variable
  2. Run the sample with the following commands:
    • cd <tuscany_sdo_install_dir>/samples/misc/deploy
    • ./bin/sdo_misc

Building the samples on Windows

If using the binary distribution the samples are built and installed in <tuscany_sdo_install_dir>/samples - go directly to Running the samples on Windows.

  1. The following environment variables are required:
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
    • AXIS2C_HOME=<path to axis2c version 0.92>
  2. You must have set up the environment for Microsoft Visual C++ tools. The build command will call vcvars32 to set the environment. Ensure the directory containing this is on your path. This will be where you installed the compiler.
  3. Build the source, either via the Visual Studio 6 project under <tuscany_sdo_install_dir>\samples\ides or via the command-line build file found at <tuscany_sdo_install_dir>\samples\ides\devstudio6\projects\misc\build.cmd which will build and deploy the samples.

Running the samples on Windows

  1. Ensure that <tuscany_sdo_install_dir>\bin is included in the PATH environment variable
  2. Run the sample with the following commands:
    • cd <tuscany_sdo_install_dir>/samples/misc/deploy
    • bin\sdo_misc

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.