2014/09/20 - Apache Axis Sandesha2/C has been retired.

For more information, please explore the Attic.

Apache Sandesha2/C Installation Guide

This document guides you on how to install Sandesha2/C with Axis2/C, and run the server and client samples on Linux and Microsoft Windows operating systems.

This release comes in two forms, source and binary. This document covers both forms.

Please send your feedback to the developer mailing list: c-dev@axis.apache.org (Subscription details are available on the Sandesha2 site.) Please remember to prefix the subject with [Axis2].

1. Installing and Running on Linux

This can be done using binary or source distributions. (Download the two distributions)

1.1. Installing Sandesha2/C Source Release on Linux

This version of Sandesha2/C depends on Axis2/C 1.1.0 Download Axis2/C from and install.

  1. Download Sandesha2 source distribution
  2. Extract the source distribution and go to extracted directory
  3. Run configure with AXIS2 include path.
    ./configure --prefix=<axis2c_deploy_path> --enable-static=no --with-axis2=<axis2c_include_path>
  4. Run make and make install

This will install the Sandesha2/C as a module in Axis2/C in <axis2c_deploy_path>/modules folder. The module folder contains the Sandesha2/C libraries and the module.xml file.

1.2. Installing Sandesha2/C Binary Release on Linux

Sandesha2/C binary distribution for Linux has the following folder structure.

   
    Sandesha2
        |
        + - modules/sandesha2 (sandesha2 module library and module.xml file)
        + - docs
        + - config (Contain sample module.xml and axis2.xml files)
        |
        + - samples
               |
               + - source files of samples in folders
        + - services (Contain sample service)
        |
        + - include ( header files)
        + - bin (database scripts)
        + - bin/samples ( sample executables)

To deploy Sandesha2/C in Axis2/C running environment copy the modules/sandesha2 into <axis2c_deploy_path>/modules folder. Do the necessary changes to the <axis2c_deploy_path>/axis2.xml to run Sandesha2/C(Refer to the sample config/axis2.xml for help).

2. Installing and Running on Microsoft Windows

This too can be done using binary or source distributions. (Download the two distributions.)

2.1. Installing Sandesha2/C Source Release on Windows

  1. You need to have unziped Axis2/C 1.1.0 release binary to some folder.
  2. Sandesha2/C can be used with one of following two database systems.
    • sqlite
    • MySQL
    So install one of above database systems on your machine.
  3. On your cmd.exe cd to <sandesha2 src>\build\win32

    Edit configure.in file with your binary locations.

    To select MySQL have your configure.in entry WITH_MYSQL = 1.

    To Select Sqlite have your configure.in entry WITH_SQLITE = 1.
  4. To set necessary environment variables on command line run vcvars32.bat file.
  5. Run nmake dist command on command line. This will build the Sandesha2/C binary and samples to a directory sandesha2 in <sandesha2 src>\build\sandesha2.

2. 2. Installing Sandesha2/C Binary Release on Windows

Sandesha2/C binary distribution will have following directory structure.

    Sandesha2
        |
        + - Sandesha2 (sandesha2 module dll and module.xml file)
        |
        + - samples
               |
               + - bin 
               |
               + - source files of samples in folders
        |
        + - include ( header files)

    
    
  1. Copy Sandesha2 directory ( containing sandesha2 dll and module.xml ) to <AXIS2C_HOME>\modules directory.
  2. Copy RMSampleService directory in samples\bin directory to <AXIS2C_HOME>\services directory
  3. Copy axis2.xml file in Sandesha2 directory to <AXIS2C_HOME>

Now you should be able to run the samples.

Notes

  1. Sandesha2/C has two main storage mechanisms call in-memory and persistent. The persistent storage could use either sqlite or MySQL as it's database manager.

    By default sandesha2 use the persistent storage with sqlite as the database.

    It is assumed that sqlite3.h in /usr/include include directory. If you have different include path for sqlite3.h then add the configure option --with-sqlite=<sqlite include file path> to the configure options above. If is assumed that libsqlite3.so is in the /usr/lib folder

    To run samples in persistent/sqlite mode copy sandesha2c/config/sqlite_schema.sh/.bat to a directory where you will create your sqlite database file and execute it to create the database schema. sqlite3 is an embedded database which need no configuration. If you use Axis2/C Apache2 module instead of simple_axis2_server make sure that Apache2 user can access the sqlite database files sandesha2_svr_db and sandesha2_client_db.

    if you want to use the in-memory storage instead, change the entry in the sandesha2_constants.h file.

    #define SANDESHA2_DEFAULT_STORAGE_MGR "persistent" 
    as
    #define SANDESHA2_DEFAULT_STORAGE_MGR "inmemory". 

    Or you can change the following entry in the module.xml file.

    <parameter name="StorageManager" locked="false">inmemory<parameter>

    <parameter name="StorageManager" locked="false">persistent<parameter>

    If you want to use persistent storage with MySQL then add the option --with-mysql=<MySQL include file path> to the configure options above. It is assumed that libmysqlclient.so is in /usr/lib folder. It is recommended to use MySQL database for any serious use. It is not included as as the default database because of licensing issues. To run samples in persistent/mysql mode run sandesha2c/config/mysql_schema.sh and sandesha2c/config/init_mysql.sh to create the database schema. The database parameters for MySQL should be included in module.xml. The defaults for server, user and password are localhost, g,g.

  2. Sandesha2/C module is installed into <axis2c_deploy_path>/modules/sandesha2c directory. The installed module contain libsandesha2.so, module.xml. The sample clients are installed into <axis2c_deploy_path>/bin/samples directory. Sample services are installed into <axis2c_deploy_path>/services directory.