Tuscany Samples - Getting Started - SDO C++ Milestone release 1

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.

 

 

 

Thank you for your interest in Tuscany.

-The Tuscany Development Team