= ZooKernel description page = On this page you will find everything you need to know about the ZooKernel. == Current status == Acutaly, you could compile and use the code available on the svn server on your own GNU / LINUX platform this way : ==== Requirements ==== To be able to compile the current source, you need to have some library allready installed on your system : * [http://www.fastcgi.com/drupal/node/5 FastCGI] (installed in /path/to/trunk/dist/, using --prefix=/path/to/trunk/dist configure option), * [http://dev.cartography.st/zoo-project/changeset/15 cgic] (same, use just {{{make}}} from the {{{/path/to/trunk/../third/cgic/}}} ) . * [http://www.xmlsoft.org/index.html libxml2], * [http://www.python.org Python]. ==== Getting the source code ==== To get the source code and compile on your platform, use the following command : {{{ #!sh cd zoo/trunk/ svn checkout svn+ssh://dev.cartography.st/mnt/data3/zoo-project/trunk/zoo-kernel zoo-kernel }}} ==== Compiling the source code ==== First of all, you'll need to edit the Makefile and uncomment "{{{-DLINUX_FREE_ISSUE}}}" on the first line, then use the following commands : {{{ #!sh cd zoo-kernel make make zoo_loader.cgi make demo_service.zo }}} Now, you get the ZooKernel (Shell and Cgi version) and two "service providers" of different kind : {{{demo_service.zo}}} (C++) and {{{test_service.py}}} (Python). ==== Using the code ==== ===== From the command line ===== To run request with ZooKernel from command command line, use the following example : {{{ #!sh ./service_loader ./ test_service.zo GetCapabilities ./service_loader ./Buffer.zcfg test_service.zo DescribeProcess ./service_loader ./Buffer.zcfg ./demo_service.zo Execute helloworld ./service_loader ./Buffer.zcfg ./demo_service.zo Execute printAgrument 1 2 ./service_loader ./Buffer.zcfg ./demo_service.zo Execute printAgrument 1 2 bg PYTHONPATH=. ./service_loader ./Distance.zcfg test_service Execute helloworld }}} ===== From an apache web server ===== You could use the cgi version of zoo_loader on your own apache server. Do do this, use the following instruction. Copy the cgi script, the demo service and the required files in your {{{cgi-bin}}} directory. {{{ #!sh cp /path/to/trunk/zoo-kernel/zoo_loader.cgi /var/www/localhost/cgi-bin cp /path/to/trunk/zoo-kernel/demo_service.zo /var/www/localhost/cgi-bin/test_service.zo cp /path/to/trunk/zoo-kernel/*zcfg /var/www/localhost/cgi-bin cp /path/to/trunk/zoo-kernel/*cfg /var/www/localhost/cgi-bin }}} Create a file {{{.htaccess}}} in a zoo directory from the directory index of your apache instalaltion. {{{ #!sh cat > /var/www/localhost/htdocs/zoo/.htaccess << EOF RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !=%{DOCUMENT_ROOT}/login.php RewriteRule (.*)/(.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] RewriteRule (.*)/(.*)/ /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] RewriteRule (.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$1&metapath= [L,QSA] EOF }}} Then you have to request your installation using your favorite browser. For instance, this [http://127.0.0.1/zoo/test_service.zo/?Service=WPS&Request=GetCapabilities&Version=1.0.0 link] should work from your Apache web server. You could also see the Cgi Version from [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?Service=WPS&request=GetCapabilities&Version=1.0.0 Shilpa !] Some other samples from the Shilpa server : * [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Language=en-CA&Identifier=Buffer DescribeProcess Response Sample 1 (Buffer)] * [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Language=en-CA&Identifier=Distance DescribeProcess Response Sample 2 (Distance)] * [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Language=en-CA&Identifier=Distance DescribeProcess Response Sample 3 (Multiply)] * [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Language=en-CA&Identifier=Distance,Buffer DescribeProcess Response Sample 4 (Distance,Buffer)] * [http://shilpa.media.osaka-cu.ac.jp/zoo/test_service.zo/?request=Execute&service=WPS&version=1.0.0&language=en-CA&Identifier=Multiply&DataInputs=A=12@datatype=integer@uom=meter;B=10@datatype=integer@uom=meter&ResponseDocument=BufferedPolygon&StoreExecuteResponse=true Execute Response Sample for Multiply Identifier]. Finally you've runed two services from two services provider, the same way.