THIS PAGE is OBSOLETE. The WAIS gateway and code is no longer maintained. - TimBL 1998 |
The W3C Reference Library support direct WAIS access which means that all applications built on top of the Library can serve as a WWW-WAIS gateway. Setting your application up to be able to access WAIS servers requires that you link the W3C Reference Library (libwww) with the freeWAIS library. Even though you do not explicitly link libwww with freeWAIS, your application can still access WAIS servers through another WWW-WAIS gateway. W3C provides such a gateway as a special service. You can find the gateway at http://www.w3.org:8001, please note the special port 8001.This page explains how you can set up your own WWW-WAIS gateway. There are basically two conditions that must be fulfilled in order to do this:
We provide precompiled binaries for some few
platforms. If yours is not among
these, or you want to compile it yourself then you must do the a small
modification in the Makefile.include
file in
WWW/All/<your platform>/Makefile.include
You simply enable the last 6 lines as indicated in the file by removing the '#' sign from the beginning of the line. An example is
# WAIS = ../../../freeWAIS
which you modify into
WAIS = ../../../freeWAIS
Now you must rebuild the W3C Reference Library
and your application using the BUILD
script. To make sure that everything is rebuilt do the following in the
WWW
directory
make clobber ./BUILD
When setting up the server as a WAIS gateway, it must be setup with separate
Pass rules
in the
configuration file. The
rules can be expressed as
Map wais://* /* Pass /* wais://*
which makes all requests to the server go to the WAIS server. The
Map
rule makes it work even if the client uses the WAIS gateway
as a proxy by issuing the whole wais URL in the request.
In this case, the server can not be used for anything else, and it is exactly what is the case for the WAIS gateway at http://www.w3.org:8001. If you want to use the server as a normal server as well, it can be hidden in the URIs that you use in the HTML documents, for example:
Pass /wais/* wais://*
Then only URIs beginning with /wais/etc.
will get forwarded
to the WAIS server.
The gateway keeps a cache of WAIS "source" files. These are files describing WAIS servers, and are parsed, and are kept in the directory /usr/local/lib/WAIS under the server name, port, and database name.
They are normally picked up automatically by searching a directory of servers index. Once the gateway has picked up a description of a server, it uses the description to describe the server to those who follow links to it. (See the HTWSRC module of Library of Common Code)