SIBO Business Objects - cgi Interface


This is a first attempt to guide you in installing the cgi-sibo interface!

The cgi-sibo provides an interface to communicate with SIBO Business Objects . The SIBO method provides an alternative to cgi for provision of Web server back-end processes, and much more.

The interface program provides support for both SIBO object messages, and for SIBOM translation into HTML using templates.

A SIBO object is enabled for access through inclusion of an environment variable, or through a configuration file. An object definition consists of:

domain objectname ipaddress port encryption key;

Where:

For example the entry to access the Fax/Mailer object would look like:

interdart.co.uk FormMail 194.70.219.11 5002 NONE 0;

If you are using the InterFilt Goserve filter, then the environment variable will be created from the globals file used by that filter. For other filters and web servers, it is probably easier to use the configuration file "cgi-sibo.cf".

The Domains section allows you to configure the program to behave differently for each ip number in a multi-homed environment. There should be an entry for IP number used by the web server. There are three fields in each domain entry; ip number, short name, and full domain name.

Sample configuration file showing a host having two IP numbers, one supprts four objects, and the other supports no objects.

Domains:
194.70.219.33,opal,OpalDomainName 
194.70.219.66,test,TestDomainName
:EndDomains

Objects_opal:
Interdart Search 194.70.219.33 5001 NONE 0;
Interdart FormMail 194.70.219.33 5002 NONE 0;
Interdart Process 194.70.219.33 5002 NONE 0;
Interdart Visitor 194.70.219.33 5008 NONE 0;
:EndObjects_opal

Objects_test::EndObjects_test

Access to a Business Object though the Web is achieved by encoding the Object name within the URL, or specifying it in the ACTION=value on a form button.

The current implementation within cgi-sibo has the following format:

Where:

The string above can be placed anywhere within a URL. If a matching files does NOT exists in the web server directory structure, a message is passed to the Business Object, and the reply is returned to the client.

Note: The available Methods are always dependant on the Business Object implementation. In the case of the Mailer SIBO Object "FormMail", the method name defines which template is to be used to create an outgoing mail message from the incoming form data. However the Object "Mail" has methods "Find", "Get" and "Drop"; which respectively will search the mail log for matching entries, get and display a message, and remove all record of a message.

Environment Variables

If you decide to use environment variables then the values from the above configuration file should be set as follows:

IF_Domains = "194.70.219.33,opal,OpalDomainName 194.70.219.66,test,TestDomainName"
IF_Objects_Opal = "Interdart Search 194.70.219.33 5001 NONE 0;Interdart FormMail 194.70.219.33 5002 NONE 0;Interdart Process 194.70.219.33 5002 NONE 0;Interdart Visitor 194.70.219.33 5008 NONE 0;"
IF_Object_Test = ""

Patching the cgi-sibo command file

Instead of setting the environment variable, you can make a simple patch to the cgi-sibo.cmd file. Open the file using the system editor, and you will se the following text on the first few lines:

/* */
    signal _VREMain
_VREMain:
/*:VRX         Main
*/
Main:
    signal on halt
/* Process a cgi request for a SIBO object */
/* Object, Method and Instance are found in the Path-Info variable */
/* The incoming data is found in the standard input file */

/* set up some global values */

    domain='opal'

/* ++++ */
    If Global.!dir == '' then    
        Global.!dir = 'E:/Web/Home/'

    dir=Global.!dir   /* Returns data directory with '/'separators */
    dir=substr(dir,1,lastpos('/',dir)-1)
    dir=substr(dir,1,lastpos('/',dir))
    Global.!Rules = dir||'RULES/'
    Global.!Objects=value('IF_Objects_'domain,,'OS2ENVIRONMENT')
/* ++++ */
    If Global.!Objects == '' then
        Global.!Objects='Interdart Visitor 194.70.219.33 5008 NONE;Interdart Mailer 194.70.219.33 5002 NONE;'

Change the line above - Global.!Object= etc. . Put the ip address of the machine running the sibo objects in place of 194.70.219.33 (my test machine address). Put the port number of your objects in place of 5008 and 5002. Change "Interdart" to your domain name (This is not currently used but change it anyway!)

Save the chaged cgi-sibo.cmd, and away you go!



Designed by and Copyright 1996 Derek Sims