Tuscany - Getting Started - SDO C++ Milestone release 3

Tuscany SDO C++ is an implementation of the Service Data Objects for C++ 2.01 specification. This page describes what is needed to install Tuscany SDO for C++.
If you haven't already done so, the first step is to download the SDO C++ Milestone 3 release of Apache Tuscany from our download page.

System Requirements

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

Software Download Link
Operating systems:
  • Windows XP SP2
  • Linux
  • Mac OS X
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, iconv and zlib 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.
Optional: Axis2C Release 0.96 Required to build the sdo_axiom utility library. This is a pre-req of the Tuscany Native WebService binding extension. http://ws.apache.org/axis2/c/download.cgi
Please download and follow the installation instructions. Ensure you can run the Axis2C samples
Optional: STDCXX Release 4.1.3 http://incubator.apache.org/stdcxx/download.html
STDCXX is the Apache implementation of the C++ Standard Library. Tuscany SDO can be built using this library implementation rather than the default platform libraries available on your operating system.
If you wish to use STDCXX please follow these instructions to build STDCXX for Tuscany SDO before following the instructions below to build SDO with STDCXX.

Installing Tuscany SDO for C++

Getting Tuscany SDO for C++ working with the source release on Linux or Mac OS X

  1. Extract the source tar package to a folder <tuscany_sdo_install_dir>
  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
    • Optional: AXIS2C_HOME=<path to axis2c version 0.96> Required if building the sdo_axiom utility library.
      Note: There is currently no Axis2C port available for Mac OS X
  3. Build the source with the following command sequence:
    • ./configure --prefix=<tuscany_sdo_install_dir>/deploy --enable-static=no
    • make
    • make install
    NOTE: If you don't provide a --prefix configure option, it will by default install into /usr/local/tuscany/sdo. Use ./configure --help to see all the available options.
    To build the sdo_axiom utility library you must specify the --with-axis2c=yes option on the configure command

    A script, build.sh, is provided that will build and install SDO for C++. This script will install to the location specified by the TUSCANY_SDOCPP environment variable if set or into a deploy directory at <tuscany_sdo_install_dir>/deploy. This script will check for the correct environment variable settings and will only build the sdo_axiom utility library if AXIS2C_HOME is set.

  4. Run the test:
    • ./sdotest.sh
    The output will indicate the number of tests passed: Using SDO installed at /usr/local/tuscany/sdo I/O warning : failed to load external entity "not_present.xsd" I/O warning : failed to load external entity "not-present.xml" I/O warning : failed to load external entity "sca-policy.xsd" I/O warning : failed to load external entity "xml.xsd" I/O warning : failed to load external entity "xhtml1-strict.xsd" Total tests:118 Tests passed:118 The I/O warning messages can be ignored.

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

  1. Unzip the supplied zip file to a folder <tuscany_sdo_install_dir>
  2. Add the <tuscany_sdo_install_dir>\bin directory to the PATH environment variable
  3. Ensure that libxml2, iconv and zlib are on the PATH environment variable. See Requirements

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

  1. Unzip the supplied source zip file to a folder <tuscany_sdo_install_dir>
  2. The following environment variables are required:
    • LIBXML2_HOME=<path to installed libxml2>
    • ICONV_HOME=<path to installed iconv>
    • ZLIB_HOME=<path to installed zlib>
    • Optional: AXIS2C_HOME=<path to axis2c version 0.96>Required if building the sdo_axiom utility library.
  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 <tuscany_sdo_install_dir>
    • build
    This will build all the projects and put the required output into the <tuscany_sdo_install_dir>\deploy directory
  5. Run the test program:
    • sdotest.bat
    The output will indicate the number of test run and passed. For example: using TUSCANY_SDOCPP: d:\tuscany_sdo_cpp-1.0-incubator-M3-src\deploy I/O warning : failed to load external entity "not_present.xsd" I/O warning : failed to load external entity "not-present.xml" I/O warning : failed to load external entity "sca-policy.xsd" I/O warning : failed to load external entity "xml.xsd" I/O warning : failed to load external entity "xhtml1-strict.xsd" Total tests:118 Tests passed:118 The I/O warning messages can be ignored.
  6. Add the <tuscany_sdo_install_dir>\deploy\bin directory to the PATH environment variable
  7. Ensure that libxml2, iconv and zlib are on the PATH environment variable. See Requirements

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

STDCXX is an implementation of the C++ Standard Library provided by Apache. The website is at http://incubator.apache.org/stdcxx/.

You must begin by downloading and building STDCXX as described here

STDCXX is supported only when used with Microsoft Visual Studio C++ V7.1. Launch the MSVC++ 7.1 studio by opening the file <tuscany_sdo_install_dir>\projectsvc7\tuscany_sdo\tuscany_sdo.sln

Both the sdo_runtime and sdo_test projects include build configurations that use STDCXX. There are several ways to access the build configurations, and all are equally effective. As an example, open the Property pages for sdo_test by right clicking on sdo_test in the Solution Explorer pane and selecting Properties. The Configuration property in the top left corner of the pane is a drop down box offering four options: Debug, Release, stdcxx-Debug, stdcxx-Release. Choose the one you want and then launch the build.

All components that are linked (by the linker) must all use the same C++ Standard library. Therefore, if either sdo_test or sdo_runtime are built with STDCXX then both must be.

Tuscany SCA does not currently offer the option to build with stdcxx and so it cannot be used with a version of SDO built using stdcxx.

Samples

SDO Technology samples Simple samples that emphasize how to to use SDO technology. Follow the instructions on the samples Getting Started page to build and run the Tuscany SDO samples

Getting Help

First place to look is at the Tuscany FAQ at http://cwiki.apache.org/TUSCANY/tuscany-sdo-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