Index: /gsdl/trunk/gs2runtime/packages/yaz/GSDL_USAGE.html
===================================================================
--- /gsdl/trunk/gs2runtime/packages/yaz/GSDL_USAGE.html	(revision 16562)
+++ /gsdl/trunk/gs2runtime/packages/yaz/GSDL_USAGE.html	(revision 16562)
@@ -0,0 +1,124 @@
+<html>
+<head>
+<title>Using the Z39.50 Client in Greenstone</title>
+</head>
+
+<body>
+<a name=top>
+<h1>Using the Z39.50 Client in Greenstone</h1>
+</a>
+<b>Table of Contents</b><br>
+<a href="#whatis">About: What is Z39.50?</a><br>
+<a href="#config">Configuring Greenstone - Adding Servers</a><br>
+<a href="#todo">Currently known problems, and TODO list</a><br>
+<a href="#contact">Contacting Us</a><br>
+
+
+
+<a name=whatis>
+<h2>What is Z39.50?</h2>
+</a>
+Z39.50 is an international client/server protocol for searching bibliographic
+data. It can use the Internet Protocol (TCP/IP), which makes the databases
+on a server available from almost anywhere around the globe. It is widely
+used, for example, in on-line library catalogues. It allows a user to search
+one or more databases and retrieve the results of the query.
+
+<p>
+Our implementation uses the YAZ z39.50 toolkit, written by
+<a href="http://www.indexdata.dk">Index Data</a>.
+
+
+
+<a name=config>
+<h2>Adding Servers</h2>
+</a>
+The file z3950.cfg in the etc/packages directory contains entries for
+each server. By default, no servers are set up, although the config file
+comes with two (commented out) example Z39.50 servers, both for servers
+of the United States' <b>Library of Congress</b>.
+<p>
+Each entry consists of:
+<ul>
+<li>A unique "short name" for internal use by Greenstone.</li>
+<li>The internet name or address of the server, and optionally the
+port that the server is running on if not the default port 210.</li>
+<li>The name of the database to search on that server.</li>
+<li>A string that provides a meaningful name for the "collection".</li>
+<li>An optional "About" string, providing some information about the database
+and/or server.</li>
+<li>Optional icon fields, which are displayed instead of the text on the
+front page.</li>
+</ul>
+The entries need only be separated by whitespace, but for the purposes of
+clarity the sample entry uses newlines and tabs.
+<p>
+The sample Library of Congress entry looks like this:
+<pre>
+LOC
+        z3950.loc.gov:7090
+        Voyager
+        "Library of Congress z39.50 server"
+        About  en  "This is the z39.50 interface to the US LoC catalogue
+           system. It contains approximately 12 million bibliographic records.
+           For server capabilities, look at
+	   &lt;a href=\"http://lcweb.loc.gov/z3950/lcserver.html\"&gt;their web pages&lt;/a&gt;."
+</pre>
+There is a list at the Library Of Congress website containing some 
+<a href="http://lcweb.loc.gov/z3950/agency/resources/testport.html">servers 
+publicly available for testing</a>.
+
+
+<a name=todo>
+<h2>Known Problems/Issues list</h2>
+</a>
+<ul>
+<li>Because of the open nature of the standard, our client may not work with
+some servers. Please notify the author (contact details below) of any
+such problems.</li>
+<li>Because of the large number of Marc fields, only the most frequently
+used fields have been given explicit names in the results. Furthermore,
+these are currently hard-coded to correspond to the USMARC field names.</li>
+<li><b>The z39.50 client will not work when fast-cgi is used!</b>. Currently,
+the use of the fast-cgi package (off by default) will disable the
+use of the z39.50 client code for Greenstone.</li>
+<li>There are spurious &lt;B&gt; tags in the title of the window when
+viewing an individual record.</li>
+<li>Greenstone will claim there are no collections if there are no
+sub-directories in the "collect" directory, even if there are configured
+z39.50 servers, although it will work if there are unbuilt collections.</li>
+</ul>
+
+<b>History</b><br>
+Jul 2001 - finally tracked down and fixed an annoying bug that caused
+greenstone to segfault when retrieving documents for some queries.<br>
+Jun 2001 - decided to drop href for field 856, as some examples have 
+explanatory text in the field as well as the URI.<br>
+Oct 2000 - cache results from server, so cut down the number of connections for
+a single query/document. Also added href for MARC field 856.<br>
+Aug 2000 - Various bug fixes and minor modifications.<br>
+Fri Aug 4 2000 - The z39.50 code is now "stable" in the main source code (in CVS).<br>
+Tue 1 Aug 2000 - selecting a field from the drop-down box now actually works. 
+This results in both quicker replies and more accurate results.<br>
+Mon 24 Jul 2000 - queries are now "AND"ed - for example, the query "computer 
+science" will now only return records that contain both words.<br>
+May-June 2000 - Code written.<br>
+
+<a name=contact>
+<h2>Contact Details</h2>
+</a>
+For general comments about Greenstone, or suggestions for improvements, send
+email to
+<a href="mailto:greenstone@cs.waikato.ac.nz?subject=z39.50 client in Greenstone">greenstone@cs.waikato.ac.nz</a><br>
+<br>
+For bug reports or questions about the z39.50 code itself, send email to
+the author, John McPherson -
+<a href="mailto:jrm21@cs.waikato.ac.nz?subject=z39.50 client in Greenstone"
+>jrm21@cs.waikato.ac.nz</a>.
+
+<p>
+<a href="#top">Back to top</a>
+<p>
+<address>Last modified: July 12, 2001 by John McPherson</address>
+</body>
+</html>
Index: /gsdl/trunk/gs2runtime/packages/yaz/README.gsdl
===================================================================
--- /gsdl/trunk/gs2runtime/packages/yaz/README.gsdl	(revision 16562)
+++ /gsdl/trunk/gs2runtime/packages/yaz/README.gsdl	(revision 16562)
@@ -0,0 +1,24 @@
+The YAZ toolkit is used by the GSDL receptionist
+when acting as a z39.50 client.
+
+June 2005, kjdon:
+Changed to use yaz version 2.1.4. This is also used by the new z3950server.
+The original yaz download has been added to cvs - this is unzipped and untared by the configure script, then only the src and client directories are compiled.
+Greenstone uses the libyaz.a library. yaz_zclient.o is modified from the sample client.o, and now lives in the colservr directory.
+
+Two files are linked against: 
+ client/yaz_client.o, which was modified from Index Data's sample 
+	client code, and
+
+ lib/libyaz.a, which contains all the z39.50 and MARC formatting code.
+	There is probably a lot of stuff in this library that does
+	not need to be there for our purposes, but for now it is,
+	merely wasting some disk space and some compile-time CPU.
+
+John McPherson
+3 August 2000
+
+yaz version 1.6
+
+September 2000:
+removed "ill" "server" "ztest" and "retrieval" subdirs.
Index: /gsdl/trunk/gs2runtime/packages/yaz/config.status
===================================================================
--- /gsdl/trunk/gs2runtime/packages/yaz/config.status	(revision 16562)
+++ /gsdl/trunk/gs2runtime/packages/yaz/config.status	(revision 16562)
@@ -0,0 +1,159 @@
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host ickenham.mdx.ac.uk:
+#
+# ./configure  --cache-file=/home/George/corbanormal/gsdl/config.cache
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running ${CONFIG_SHELL-/bin/sh} ./configure  --cache-file=/home/George/corbanormal/gsdl/config.cache --no-create --no-recursion"
+    exec ${CONFIG_SHELL-/bin/sh} ./configure  --cache-file=/home/George/corbanormal/gsdl/config.cache --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "./config.status generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "$ac_cs_usage"; exit 0 ;;
+  *) echo "$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=.
+
+trap 'rm -fr Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile doc/Makefile conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+/^[ 	]*VPATH[ 	]*=[^:]*$/d
+
+s%@SHELL@%/bin/sh%g
+s%@CFLAGS@%-g -O2%g
+s%@CPPFLAGS@%%g
+s%@CXXFLAGS@%%g
+s%@FFLAGS@%%g
+s%@DEFS@% -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -DSTDC_HEADERS=1 %g
+s%@LDFLAGS@%%g
+s%@LIBS@% -lreadline -lhistory%g
+s%@exec_prefix@%${prefix}%g
+s%@prefix@%/usr/local%g
+s%@program_transform_name@%s,x,x,%g
+s%@bindir@%${exec_prefix}/bin%g
+s%@sbindir@%${exec_prefix}/sbin%g
+s%@libexecdir@%${exec_prefix}/libexec%g
+s%@datadir@%${prefix}/share%g
+s%@sysconfdir@%${prefix}/etc%g
+s%@sharedstatedir@%${prefix}/com%g
+s%@localstatedir@%${prefix}/var%g
+s%@libdir@%${exec_prefix}/lib%g
+s%@includedir@%${prefix}/include%g
+s%@oldincludedir@%/usr/include%g
+s%@infodir@%${prefix}/info%g
+s%@mandir@%${prefix}/man%g
+s%@CC@%gcc%g
+s%@CPP@%gcc -E%g
+s%@RANLIB@%ranlib%g
+s%@have_sgml2txt@%no%g
+s%@have_sgml2latex@%no%g
+s%@have_sgml2html@%no%g
+s%@ASNMODULE@%z39.50%g
+s%@ILLMODULE@%ill%g
+s%@ILLLIB@%../ill/libill.a%g
+s%@SUBDIRS_VAR@%util odr z39.50 zutil comstack ccl tab include lib client %g
+
+CEOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+
+CONFIG_FILES=${CONFIG_FILES-"Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile doc/Makefile"}
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+
+
+exit 0
Index: /gsdl/trunk/gs2runtime/src/corba/Makefile.in
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/Makefile.in	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/Makefile.in	(revision 16562)
@@ -0,0 +1,156 @@
+###########################################################################
+#
+# Makefile -- src/corba
+# A component of the Greenstone digital library software
+# from the New Zealand Digital Library Project at the
+# University of Waikato, New Zealand.
+#
+# Copyright (C) 1999-2008  The New Zealand Digital Library Project
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+###########################################################################
+
+GSDL_DIR = ../..
+INDEXERS_DIR = $(GSDL_DIR)/indexers
+PACKAGES_DIR = $(GSDL_DIR)/packages
+COLSERVR_DIR = $(GSDL_DIR)/src/colservr
+PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
+RECPT_DIR = $(GSDL_DIR)/src/recpt
+
+
+ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
+ifeq ($(ENABLE_ACCENTFOLD), 1)
+ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a 
+else
+ACCENTFOLD_LIBS = 
+endif
+
+USE_SQLITE = @USE_SQLITE@
+ifeq ($(USE_SQLITE), 1)
+SQLITE_LIBS = $(PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
+else
+SQLITE_LIBS = 
+endif
+
+MICO_DIR = @MICO_DIR@
+MICO_VER = @MICO_VER@
+ifeq ($(MICO_DIR), default)
+MICO_INCLUDES = -I$(PACKAGES_DIR)/mico/mico/include
+MICO_PATH = $(PACKAGES_DIR)/mico/bin/
+else
+ifeq ($(MICO_DIR), yes)
+MICO_INCLUDES =
+else
+MICO_INCLUDES = -I$(MICO_DIR)
+endif
+MICO_PATH =
+endif
+
+USE_CORBA = @USE_CORBA@
+ifeq ($(USE_CORBA), 1)
+AR = ar
+CC = @CC@
+CFLAGS = @CFLAGS@
+DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
+INCLUDES = -I$(GSDL_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text \
+	$(MICO_INCLUDES)
+INSTALL = @INSTALL@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
+        $(SQLITE_LIBS) -L$(PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
+RANLIB = @RANLIB@
+
+
+COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
+LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
+
+
+.SUFFIXES: .mpp .o
+.mpp.o:
+	$(COMPILE) $<
+
+
+SOURCES = \
+	corbaconv_text_t.mpp \
+	corbaiface.mpp \
+	corbaiface_skel.mpp \
+	corbaproto.mpp \
+	corbatext_t.mpp
+
+OBJECTS = \
+	corbaconv_text_t.o \
+	corbaiface.o \
+	corbaiface_skel.o \
+	corbaproto.o \
+	corbatext_t.o
+
+CORBASERVER_OBJECTS = \
+	corbaServer.o
+
+CORBARECPT_OBJECTS = \
+	corbaclient.o
+
+GSDL_LIBS = \
+	$(RECPT_DIR)/gsdlrecpt.a \
+	$(PROTOCOL_DIR)/gsdlprotocol.a \
+	$(COLSERVR_DIR)/gsdlcolservr.a \
+	$(INDEXERS_DIR)/mg/src/text/libmgtext.a \
+	$(INDEXERS_DIR)/mg/lib/libmglib.a \
+	$(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
+	$(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
+	$(GSDL_DIR)/src/lib/gsdllib.a
+
+CORBASERVER_EXECUTABLE_OBJECTS = \
+	$(OBJECTS) \
+	$(CORBASERVER_OBJECTS) \
+	$(GSDL_LIBS)
+
+CORBARECPT_EXECUTABLE_OBJECTS = \
+	$(OBJECTS) \
+	$(CORBARECPT_OBJECTS) \
+	$(GSDL_LIBS)
+
+EXECUTABLES = corbaserver corbarecptldd
+
+
+# Default target: make both corbaserver and corbarecptldd
+all: $(EXECUTABLES)
+
+corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
+	$(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
+
+corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
+	$(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
+
+install:
+
+clean:
+	rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
+
+distclean:
+	rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES) Makefile
+
+depend:
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
+
+else
+all:
+install:
+clean:
+distclean:
+depend:
+endif
Index: /gsdl/trunk/gs2runtime/src/corba/corbaServer.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaServer.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaServer.mpp	(revision 16562)
@@ -0,0 +1,491 @@
+// Standard headers
+#include <iostream.h>
+#include <fstream.h>
+
+// protocol headers
+#include "corbaiface.h"
+using namespace gsdlInterface;
+
+#include "corbaconv_text_t.h"
+
+// library headers
+#include "fileutil.h"
+//#include "gsdlhome.h"
+
+// greenstone headers
+#include "comtypes.h"
+#include "recptproto.h"
+#include "nullproto.h"
+
+// local headers
+#include "corbatext_t.h"
+
+void corbatext_setToCorbaArray(text_tset set, corbatext_tset *cset);
+void corbatext_corbaArrayToSet(corbatext_tset cset, text_tset *set);
+void corbatext_mapToCorbaMap(text_tmap map, corbatext_tmap *tm);
+void corbaresponse_resultDocInfoToCorba(ResultDocInfo_tarray docinfo, corbaResultDocInfo_array &corbainfo);
+
+void corbaresponse_termInfoToCorba(TermInfo_tarray terminfo, corbaTermInfo_array &corbainfo) {
+  TermInfo_tarray::iterator here = terminfo.begin();
+  TermInfo_tarray::iterator end  = terminfo.end();
+  unsigned int i;
+	
+  i = 0;
+
+  while (here != end) 
+    {
+      corbainfo.length(i+1);
+      
+      corbainfo[i].frequency = here->freq;
+      corbaconv_text_t::getCorbatext(here->term,corbainfo[i].term);
+      corbatext_arrayToCorbaArray(here->matchTerms, &corbainfo[i].matchTerms);
+
+      i ++;
+      here ++;
+    }
+  cout << "Terminfo " << i << endl;
+}
+
+void corbatext_optionValueArrayToC(corbaOptionValue_array corba, OptionValue_tarray &array)
+{
+  unsigned int i = 0;
+  OptionValue_t option;
+
+  for (i = 0; i < corba.length(); i ++)
+    {
+      corbaconv_text_t::setCorbatext(option.name,corba[i].name);
+      corbaconv_text_t::setCorbatext(option.value,corba[i].value);
+
+      // cout << corbatext_string(corba[i].name) << "?" << option
+
+      array.push_back(option);
+    }
+}
+
+class corbaServer : virtual public corbaiface_skel
+{
+private:
+  text_tarray collections;
+  recptproto *protocol;
+  text_t      gsdlhome;
+
+  void openLogfile(text_t extension, ofstream &out)
+  {
+    char *cfilename;
+    text_t filename;
+
+    filename = filename_cat(gsdlhome, extension);
+    cfilename = filename.getcstr();
+
+    out.open(cfilename);
+    delete cfilename;
+  }
+
+public:
+  corbaServer(recptproto *protocol, text_t home)
+  { 
+    text_t dirname;
+    char * cdirname;
+
+    cout << "CorbaServer: gsdlhome = " << home << endl;
+
+    this->gsdlhome = home;
+    cout << gsdlhome.getcstr() << endl;
+    dirname = filename_cat(gsdlhome, "/collect");
+    cdirname = dirname.getcstr();
+    if (!read_dir (cdirname, collections)) {
+      cout << "Unable to read the gsdl directory; terminating" << endl;
+      exit (1);
+    }
+    delete cdirname;
+
+    cout << "Constructing set list server" << endl;
+    this->protocol = protocol;
+
+  }
+  
+  CORBA::Boolean initialise(corbaComError &err) 
+  {
+      ofstream      logout;
+      int           reply;
+      comerror_t    error = noError;
+
+      this->openLogfile("/etc/corbaout.txt", logout);
+      reply = protocol->init(error, logout);
+      logout.close();
+      return (reply != 0 ? 1 : 0);
+    }
+
+  void configure(const corbatext_t &corbaKey, const corbatext_tarray &corbaCfgline,corbaComError &err)
+    {
+      text_t        key;
+      text_tarray   cfgline;
+      comerror_t    error = noError;
+
+      corbaconv_text_t::setCorbatext(key,corbaKey);
+      corbatext_corbaArrayToArray(corbaCfgline, &cfgline);
+
+
+      // ****
+      cout << "Recieved " << key << " = ";
+      for (int unsigned i=0; i<cfgline.size(); i++)
+	{
+	  cout << cfgline[i] << " ";
+	}
+      cout << endl;
+
+      // DB // ****
+      if (key=="gsdlhome")
+	{  
+	  text_tarray cfgline;
+	  cfgline.push_back (gsdlhome);
+	  cout << "Changing gsdlhome to " << gsdlhome << endl;
+	  protocol->configure(key, cfgline, error);
+	}
+      else if (key=="httpdomain")
+	{
+	  // Only let gsdlhome through !!!! // ****
+	  cout << "Supressing httpdomain" << endl;
+	}
+      else if (key=="httpprefix")
+	{
+	  cout << "Supressing httpprefix" << endl;
+	}
+      else
+	{ 
+	  protocol->configure(key, cfgline,error);
+	}
+    }
+
+  void hasCollection(const corbatext_t &corbaCollect, CORBA::Boolean &has,
+                     corbaComError &error) {
+    // do nowt!
+    corbaconv_text_t *cct;
+    bool    _has;
+    comerror_t err = noError;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    cct = new corbaconv_text_t(corbaCollect);
+
+    cout << "Collection: " << cct->getcstr() << endl;
+
+    protocol->has_collection(*cct, _has, err, logout); // 'cct' typecast to text_t
+    if (_has)
+      { 
+	has = 1;
+      }
+    else
+      {
+	has = 0;
+      }
+
+    // cout << "  " << has << endl;
+
+    delete cct;
+
+    error = corbaNoError;
+    logout.close();
+  }
+
+  void ping(const struct corbatext_t &corbaCollect, CORBA::Boolean &wasSuccess, corbaComError &corbaError)
+  { 
+    text_t collection;
+    bool   success;
+    comerror_t error = noError;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    corbaconv_text_t::setCorbatext(collection,corbaCollect);
+    protocol->ping(collection, success, error, logout);
+
+    corbaError = (corbaComError) error;
+    wasSuccess = (CORBA::Boolean) success;
+    logout.close();
+  }
+
+  void filter(const struct corbatext_t &corbaCollect,
+	      const struct corbaFilterRequest &corbaRequest,
+	      struct corbaFilterResponse &corbaResponse,
+	      corbaComError &corbaError)
+  {
+    // variables for action
+    FilterRequest_t request;
+    FilterResponse_t response;
+    comerror_t       error = noError;
+    text_t           collection;
+    ofstream         logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    // copy collection id
+    corbaconv_text_t::setCorbatext(collection,corbaCollect);
+
+    // copy request values
+    corbaconv_text_t::setCorbatext(request.filterName,corbaRequest.filter);
+    corbatext_optionValueArrayToC(corbaRequest.filterOptions, request.filterOptions);
+    corbatext_corbaArrayToArray(corbaRequest.docSet, &request.docSet);
+    request.filterResultOptions = corbaRequest.filterResultOptions;
+    corbaconv_text_t::setCorbatext(request.requestParams,corbaRequest.requestParams);
+    corbaconv_text_t::setCorbatext(request.refParams,corbaRequest.refParams);
+    corbatext_corbaArrayToSet(corbaRequest.fields, &request.fields);
+    request.getParents = corbaRequest.getParents;
+
+    protocol->filter(collection, request, response, error, logout);
+
+    // copy response values
+    corbaResponse.numDocs = response.numDocs;
+    corbaResponse.isApprox = (::gsdlInterface::corbaIsApprox) response.isApprox;
+    corbaresponse_termInfoToCorba(response.termInfo, corbaResponse.termInfo);
+    corbaresponse_resultDocInfoToCorba(response.docInfo, corbaResponse.docInfo);
+
+    // tidy up variables
+    logout.close();
+    corbaError = (corbaComError) error;
+    cout << "Filter prepared" << corbaResponse.docInfo.length() << "," << corbaResponse.numDocs << endl;
+  }
+
+  void getCollectInfo(const struct corbatext_t &corbaCollect,
+                      corbaColInfoResponse &corbaResponse,
+                      corbaComError &corbaError)
+  {
+    ColInfoResponse_t response;
+    comerror_t       error = noError;
+    text_t           collection;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    corbaconv_text_t::setCorbatext(collection,corbaCollect);
+    protocol->get_collectinfo(collection, response, error, logout);
+
+    cout << "IsPublic  = " << ((response.isPublic)?"True":"False") << endl;
+    cout << "IsBeta    = " << ((response.isBeta)  ?"True":"False") << endl;
+    cout << "BuildDate = " << response.buildDate << endl;
+    cout << "NumDocs   = " << response.numDocs << endl;
+    cout << "NumBytes  = " << response.numBytes << endl;
+    cout << "NumWords  = " << response.numWords << endl;
+    cout << "UseBook   = " << ((response.useBook)  ?"True":"False") << endl;
+    
+    corbaResponse.useBook   = response.useBook;
+    corbaResponse.isPublic  = response.isPublic;
+    corbaResponse.isBeta    = response.isBeta;
+    corbaResponse.buildDate = response.buildDate;
+    corbatext_arrayToCorbaArray(response.languages, &corbaResponse.languages);
+    corbatext_arrayToCorbaArray(response.ccsCols, &corbaResponse.ccsCols);
+    corbaResponse.numDocs   = response.numDocs;
+    corbaResponse.numBytes  = response.numBytes;
+    corbaResponse.numWords  = response.numWords;
+
+    corbatext_mapToCorbaMap(response.collectionmeta, &corbaResponse.collectionMeta);
+    corbatext_mapToCorbaMap(response.format, &corbaResponse.format);
+    corbatext_mapToCorbaMap(response.building, &corbaResponse.building);
+    corbaconv_text_t::getCorbatext(response.httpdomain,corbaResponse.httpdomain);
+
+    corbaconv_text_t::getCorbatext(response.httpprefix,corbaResponse.httpprefix);
+    corbaconv_text_t::getCorbatext(response.receptionist,corbaResponse.receptionist);
+
+    /* text_tmap::iterator f_here = response.format.begin();
+    text_tmap::iterator f_end = response.format.end();
+    while (f_here!=f_end)
+    {
+      cout << "**** format: " << f_here->first << " = " << f_here->second << endl;
+      f_here++;
+    } 
+    */ // ****
+
+    logout.close();
+    corbaError = (corbaComError) error;
+  }
+
+  void getFilterOptions(const struct corbatext_t &corbaCollect,
+			const struct corbatext_t &corbaFilterName,
+			struct corbaFilterOptionsResponse &corbaResponse,
+			enum corbaComError &corbaError)
+  {   
+    text_t collection;
+    InfoFilterOptionsRequest_t request;
+    InfoFilterOptionsResponse_t response;
+    comerror_t error = noError;
+    unsigned int i;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    corbaconv_text_t::setCorbatext(collection,corbaCollect);
+    corbaconv_text_t::setCorbatext(request.filterName,corbaFilterName);
+    protocol->get_filteroptions(collection, request, response, error, logout);
+
+    // decode filters back into corba format
+    FilterOption_tmap::iterator here = response.filterOptions.begin();
+    FilterOption_tmap::iterator end = response.filterOptions.end();
+    i = 0;
+    while (here != end)
+      {
+	// set array for name/options to be one bigger
+	corbaResponse.names.length(i+1);
+	corbaResponse.options.length(i+1);
+
+	// get left-hand side of map
+	corbaconv_text_t::getCorbatext((*here).first,corbaResponse.names[i]);
+	
+	// get right-hand side of map
+	corbaconv_text_t::getCorbatext((*here).second.name,corbaResponse.options[i].name);
+	corbaResponse.options[i].type = 
+	  (::gsdlInterface::corbaFilterType)(*here).second.type;
+	corbaResponse.options[i].repeatable = 
+	  (::gsdlInterface::corbaFilterRepeatable)(*here).second.repeatable;
+	corbaconv_text_t::getCorbatext((*here).second.defaultValue,corbaResponse.options[i].defaultValue);
+	corbatext_arrayToCorbaArray((*here).second.validValues, &corbaResponse.options[i].validValues);
+
+	// take next iterators
+	i++;
+	here ++;
+      }
+
+    logout.close();
+    corbaError = (corbaComError) error;
+  }
+
+  void getFilterInfo(const struct corbatext_t &corbaCollect, 
+		     corbatext_tarray &filterNames, 
+		     enum corbaComError &corbaError)
+  { text_tarray ta;
+    comerror_t error = noError;
+    text_t collection;    
+    InfoFiltersResponse_t response;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    corbaconv_text_t::setCorbatext(collection,corbaCollect);
+    cout << collection.getcstr() << endl;
+			    
+    protocol->get_filterinfo(collection, response, error, logout);
+    corbatext_setToCorbaArray(response.filterNames, &filterNames);
+
+    corbaError = (corbaComError) error;
+    logout.close();
+  }
+  
+  void getDocument(const struct corbatext_t &corbaCollection, struct corbaDocRequest &corbaRequest, 
+		   struct corbaDocResponse &corbaResponse,  enum corbaComError &corbaError)
+  { DocumentRequest_t request;
+    DocumentResponse_t response;
+    comerror_t         error = noError;
+    text_t             collection;
+    ofstream logout;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    // set up request
+    corbaconv_text_t::setCorbatext(collection,corbaCollection);
+    corbaconv_text_t::setCorbatext(request.OID,corbaRequest.OID);
+    corbaconv_text_t::setCorbatext(request.docType,corbaRequest.docType);
+    corbaconv_text_t::setCorbatext(request.docFormat,corbaRequest.docFormat);
+
+    // do actual get document
+    protocol->get_document(collection, request, response, error, logout);
+    corbaconv_text_t::getCorbatext(response.doc,corbaResponse.doc);
+
+    // decode response
+    corbaError = (corbaComError) error;
+
+    logout.close();
+  }
+
+  void collectionList(corbatext_tarray &corbalist, corbaComError &error)
+  {
+    /* stringSeq *reply;
+    unsigned int i;
+    char *istring; */
+
+    text_tarray collist;
+    comerror_t  err;
+    ofstream logout;
+
+    cout << "Received collection list request" << endl;
+
+    this->openLogfile("/etc/corbaout.txt", logout);
+
+    protocol->get_collection_list(collist, err, logout);
+
+    /*    reply = new stringSeq(collections.size());
+    
+    (*reply).length(collections.size());
+    for (i = 0; i < collections.size(); i ++)
+      {
+	istring = collections[i].getcstr();
+	(*reply)[i] = CORBA::string_dup(istring);
+	delete istring;
+      }
+    
+    return reply;
+    */
+
+    corbatext_arrayToCorbaArray(collist, &corbalist);
+    cout << "Replying " << collist.size() << ": " << endl;
+
+    for (int unsigned i = 0; i < collist.size(); i ++)
+      {
+	cout << collist[i];
+	if (i<collist.size()-1) cout << ", ";
+      }
+    cout << endl;
+
+    logout.close();
+    // CORBA::string_dup(_listString);
+  }
+};
+
+int main (int argc, char *argv[])
+{
+  nullproto protocol;
+  collectset *cservers;
+  text_t     gsdlhome;
+
+  cservers = new collectset(gsdlhome);
+  protocol.set_collectset(cservers);
+
+  cout << "Started Corba ..." << endl;
+
+  // ORB initialization
+  CORBA::ORB_var orb = CORBA::ORB_init( argc, argv, "mico-local-orb" );
+  CORBA::BOA_var boa = orb->BOA_init( argc, argv, "mico-local-boa" );
+
+  cout << "Initialised ORB and BOA" << endl;
+
+  corbaServer* server = new corbaServer(&protocol, gsdlhome);
+
+  cout << "Initialised server" << endl;
+
+  CORBA::String_var ref = orb->object_to_string( server );
+
+  cout << "Mapped Corba object to string" << endl;
+
+  // write id to "naming service"
+  ofstream out ("/tmp/localcorba.objid");
+	if (out.is_open()) {
+		out << ref << endl;
+		if (out.fail() || out.bad()) {
+			cout << "Failed " << endl;
+		}
+		out.close ();
+	}
+	else {
+		cout << "Unable to write string to file /tmp/localcorba.objid" << endl;
+		cout << "Please check the file permissions/ownership" << endl;
+		return 0;
+	}
+  cout << "Corba string is " << ref << endl;
+
+  // indicate readiness and run
+  boa->impl_is_ready( CORBA::ImplementationDef::_nil() );
+  orb->run ();
+  CORBA::release( server );
+  return 0;
+}
+
+
Index: /gsdl/trunk/gs2runtime/src/corba/corbaclient.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaclient.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaclient.mpp	(revision 16562)
@@ -0,0 +1,160 @@
+/**********************************************************************
+ *
+ * corbaclient.cpp -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ *
+ *********************************************************************/
+
+#include "receptionist.h"
+#include "cgiwrapper.h"
+#include "corbaproto.h"
+#include "collectserver.h"
+#include "filter.h"
+#include "browsefilter.h"
+#include "queryfilter.h"
+#include "mgsearch.h"
+#include "fileutil.h"
+#include <assert.h>
+
+#include "action.h"
+#include "statusaction.h"
+#include "pageaction.h"
+#include "pingaction.h"
+#include "queryaction.h"
+#include "documentaction.h"
+#include "authenaction.h"
+#include "usersaction.h"
+#include "authenaction.h"
+#include "extlinkaction.h"
+#include "tipaction.h"
+#include "collectoraction.h"
+
+#include "browserclass.h"
+#include "vlistbrowserclass.h"
+#include "hlistbrowserclass.h"
+#include "datelistbrowserclass.h"
+#include "invbrowserclass.h"
+#include "pagedbrowserclass.h"
+#include "htmlbrowserclass.h"
+
+// #include "gsdlhome.h"
+#include "gsdlsitecfg.h"
+
+int main (int argc, char *argv[]) {
+  receptionist recpt;
+  corbaproto*  cproto_array[argc];
+  text_t       gsdlhome;
+  text_t       httpdomain;
+  text_t       httpprefix;
+  
+  cproto_array[0] = NULL; // unused
+
+  if (argc == 1)
+  { cout << "Content-type: text/html" << endl << endl;
+    cout << "Usage: " << argv[0] << "site1.objid [site2.objid ....]" << endl;
+    return 0;
+  }
+
+  // Strictly speaking httpdomain and httpprefix are not needed.
+  // Need to modifiy site_cfg_read to eliminate this dependency. // ****
+  site_cfg_read(gsdlhome, httpdomain, httpprefix);
+
+  for (int i=1; i<argc; i ++)
+    {
+      // add the protocol to the receptionist
+      cproto_array[i] = new corbaproto(argv[i]);
+      recpt.add_protocol(cproto_array[i]);
+    }
+
+//  cout << "GRB 2" << endl;
+
+  // the list of actions. Note: these actions will become invalid
+  // at the end of this function.
+  tipaction atipaction;
+  recpt.add_action(&atipaction);
+
+  statusaction astatusaction;
+  astatusaction.set_receptionist (&recpt);
+  recpt.add_action (&astatusaction);
+
+  pageaction apageaction;
+  apageaction.set_receptionist (&recpt);
+  recpt.add_action (&apageaction);
+
+  pingaction apingaction;
+  recpt.add_action (&apingaction);
+
+  queryaction aqueryaction;
+  aqueryaction.set_receptionist (&recpt);
+  recpt.add_action (&aqueryaction);
+
+  documentaction adocumentaction;
+  adocumentaction.set_receptionist (&recpt);
+  recpt.add_action (&adocumentaction);
+
+  usersaction ausersaction;
+  recpt.add_action (&ausersaction);
+
+  extlinkaction anextlinkaction;
+  recpt.add_action (&anextlinkaction);
+
+  authenaction aauthenaction;
+  aauthenaction.set_receptionist(&recpt);
+  recpt.add_action (&aauthenaction);
+
+  collectoraction acollectoraction;
+  acollectoraction.set_receptionist (&recpt);
+  recpt.add_action(&acollectoraction);
+
+//  cout << "GRB 3" << endl;
+
+  // list of browsers
+  vlistbrowserclass avlistbrowserclass;
+  recpt.add_browser (&avlistbrowserclass);
+  recpt.setdefaultbrowser ("VList");
+
+  hlistbrowserclass ahlistbrowserclass;
+  recpt.add_browser (&ahlistbrowserclass);
+
+  datelistbrowserclass adatelistbrowserclass;
+  recpt.add_browser (&adatelistbrowserclass);
+
+  invbrowserclass ainvbrowserclass;
+  recpt.add_browser (&ainvbrowserclass);
+
+  pagedbrowserclass apagedbrowserclass;
+  recpt.add_browser (&apagedbrowserclass);
+
+  htmlbrowserclass ahtmlbrowserclass;
+  recpt.add_browser (&ahtmlbrowserclass);
+
+  cgiwrapper (recpt, "");
+
+  for (int i=1; i< argc; i++)
+    {
+      delete cproto_array[i];
+    }
+
+  return 0;
+}
+
Index: /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.h
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.h	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.h	(revision 16562)
@@ -0,0 +1,68 @@
+/**********************************************************************
+ *
+ * corbaconv_text_t.mpp -- conversion support text_t <-> corba_text_t
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ *
+ *********************************************************************/
+
+
+#ifndef CORBACONV_TEXT_T_H
+#define CORBACONV_TEXT_T_H
+
+#include "text_t.h"
+
+// Inherit from text_t
+// Provide support to convert from corba_text_t to text_t and vice versa
+
+class corbaconv_text_t : public text_t {
+  
+public:
+  // constructors
+  corbaconv_text_t (corbatext_t t);
+
+  void setCorbatext(corbatext_t ct);
+  void getCorbatext(corbatext_t &ct) const;
+  void fillUsString(usString *us) const;
+
+  static void setCorbatext(text_t& t, corbatext_t ct);
+  static void getCorbatext(const text_t& t, corbatext_t &ct);
+  static void fillUsString(const text_t& t, usString *us);
+};
+
+
+inline void corbaconv_text_t::setCorbatext(corbatext_t ct) 
+{ 
+  setCorbatext(*this,ct); 
+}
+
+inline void corbaconv_text_t::getCorbatext(corbatext_t& ct) const
+{ 
+  getCorbatext(*this,ct); 
+}
+
+inline void corbaconv_text_t::fillUsString(usString *us) const
+{
+  fillUsString(*this,us);
+}
+
+#endif
Index: /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaconv_text_t.mpp	(revision 16562)
@@ -0,0 +1,109 @@
+/**********************************************************************
+ *
+ * corbaconv_text_t.mpp -- conversion support text_t <-> corba_text_t
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ *
+ *********************************************************************/
+
+#if defined(GSDL_USE_STL_H) || defined(__APPLE__)
+#include <vector.h>
+#else
+#include <vector>
+#endif
+
+// protocol header
+#include "corbaiface.h"
+using namespace gsdlInterface;
+
+#include "corbatext_t.h"
+
+#include "corbaconv_text_t.h"
+
+
+#if defined(GSDL_USE_OBJECTSPACE)
+#  include <ospace\std\algorithm>
+#elif defined(GSDL_USE_STL_H)
+#  if defined(GSDL_USE_ALGO_H)
+#    include <algo.h>
+#  else
+#    include <algorithm.h>
+#  endif
+#else
+#  include <algorithm>
+#endif
+
+#ifdef HAVE_CONFIG_H
+# ifdef __WIN32__
+#  include "win32cfg.h"
+# else
+#  include "mico/config.h"
+# endif
+#endif
+
+
+// #include "unitool.h" // ****
+
+////////////////////////////////////
+// corbaconv_text_t methods
+////////////////////////////////////
+
+corbaconv_text_t::corbaconv_text_t (corbatext_t t)
+{ 
+  setCorbatext(t);  
+}
+
+void corbaconv_text_t::getCorbatext(const text_t& t, corbatext_t &ct)
+{
+  ct.encoding = 0;
+  fillUsString(t,&ct.text);
+}
+
+void corbaconv_text_t::setCorbatext(text_t& t, corbatext_t ct)
+{
+  t.setencoding(0);
+  t.clear();
+  corbatext_usvector(ct, t.text_as_usvector());
+}
+
+void corbaconv_text_t::fillUsString(const text_t& t, usString *us)
+{
+  unsigned int i;
+  usvector::const_iterator here = t.text_as_usvector().begin();
+  usvector::const_iterator end = t.text_as_usvector().end();
+
+
+  if (end == here)
+    { 	
+      return;
+    }
+  (*us).length(end - here);
+  i = 0;
+
+  while (here != end)
+    {
+      (*us)[i] = *here;
+      i ++;
+      here ++;
+    }
+  
+}
Index: /gsdl/trunk/gs2runtime/src/corba/corbaiface.h
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaiface.h	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaiface.h	(revision 16562)
@@ -0,0 +1,614 @@
+/*
+ *  MICO --- a free CORBA implementation
+ *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
+ *
+ *  This file was automatically generated. DO NOT EDIT!
+ */
+
+#if !defined(__CORBAIFACE_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
+#define __CORBAIFACE_H__
+
+#ifndef MICO_NO_TOPLEVEL_MODULES
+#include <CORBA.h>
+#include <mico/throw.h>
+#endif
+
+#ifndef MICO_NO_TOPLEVEL_MODULES
+MICO_NAMESPACE_DECL gsdlInterface {
+#endif
+
+#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_gsdlInterface)
+
+
+typedef SequenceTmpl<CORBA::UShort,MICO_TID_DEF> usString;
+#ifdef _WINDOWS
+static usString _dummy_usString;
+#endif
+typedef TSeqVar<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_var;
+typedef TSeqOut<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_out;
+
+typedef StringSequenceTmpl<CORBA::String_var> stringSeq;
+#ifdef _WINDOWS
+static stringSeq _dummy_stringSeq;
+#endif
+typedef TSeqVar<StringSequenceTmpl<CORBA::String_var> > stringSeq_var;
+typedef TSeqOut<StringSequenceTmpl<CORBA::String_var> > stringSeq_out;
+
+struct corbatext_t;
+typedef TVarVar<corbatext_t> corbatext_t_var;
+typedef TVarOut<corbatext_t> corbatext_t_out;
+
+struct corbatext_t {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbatext_t_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbatext_t();
+  ~corbatext_t();
+  corbatext_t( const corbatext_t& s );
+  corbatext_t& operator=( const corbatext_t& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  usString text;
+  CORBA::UShort encoding;
+  CORBA::ULong length;
+};
+
+typedef SequenceTmpl<corbatext_t,MICO_TID_DEF> corbatext_tarray;
+#ifdef _WINDOWS
+static corbatext_tarray _dummy_corbatext_tarray;
+#endif
+typedef TSeqVar<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_var;
+typedef TSeqOut<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_out;
+
+typedef corbatext_tarray corbatext_tset;
+#ifdef _WINDOWS
+static corbatext_tset _dummy_corbatext_tset;
+#endif
+typedef TSeqVar<corbatext_tarray > corbatext_tset_var;
+typedef TSeqOut<corbatext_tarray > corbatext_tset_out;
+
+struct corbatext_tmap;
+typedef TVarVar<corbatext_tmap> corbatext_tmap_var;
+typedef TVarOut<corbatext_tmap> corbatext_tmap_out;
+
+struct corbatext_tmap {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbatext_tmap_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbatext_tmap();
+  ~corbatext_tmap();
+  corbatext_tmap( const corbatext_tmap& s );
+  corbatext_tmap& operator=( const corbatext_tmap& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_tarray names;
+  corbatext_tarray values;
+};
+
+enum corbaComError {
+  corbaNoError = 0,
+  corbaAuthenticationFailure,
+  corbaProtocolError,
+  corbaConfigurationError,
+  corbaSystemProblem
+};
+
+typedef corbaComError& corbaComError_out;
+
+struct corbaShortColInfo;
+typedef TVarVar<corbaShortColInfo> corbaShortColInfo_var;
+typedef TVarOut<corbaShortColInfo> corbaShortColInfo_out;
+
+struct corbaShortColInfo {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaShortColInfo_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaShortColInfo();
+  ~corbaShortColInfo();
+  corbaShortColInfo( const corbaShortColInfo& s );
+  corbaShortColInfo& operator=( const corbaShortColInfo& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t name;
+  corbatext_t host;
+  CORBA::Long response;
+};
+
+struct corbaColInfoResponse;
+typedef TVarVar<corbaColInfoResponse> corbaColInfoResponse_var;
+typedef TVarOut<corbaColInfoResponse> corbaColInfoResponse_out;
+
+struct corbaColInfoResponse {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaColInfoResponse_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaColInfoResponse();
+  ~corbaColInfoResponse();
+  corbaColInfoResponse( const corbaColInfoResponse& s );
+  corbaColInfoResponse& operator=( const corbaColInfoResponse& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbaShortColInfo shoftInfo;
+  CORBA::Boolean useBook;
+  CORBA::Boolean isPublic;
+  CORBA::Boolean isBeta;
+  CORBA::ULong buildDate;
+  corbatext_tarray ccsCols;
+  corbatext_tarray languages;
+  CORBA::ULong numDocs;
+  CORBA::ULong numWords;
+  CORBA::ULong numBytes;
+  corbatext_tmap collectionMeta;
+  corbatext_tmap format;
+  corbatext_tmap building;
+  corbatext_t httpdomain;
+  corbatext_t httpprefix;
+  corbatext_t receptionist;
+};
+
+struct corbaDocRequest;
+typedef TVarVar<corbaDocRequest> corbaDocRequest_var;
+typedef TVarOut<corbaDocRequest> corbaDocRequest_out;
+
+struct corbaDocRequest {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaDocRequest_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaDocRequest();
+  ~corbaDocRequest();
+  corbaDocRequest( const corbaDocRequest& s );
+  corbaDocRequest& operator=( const corbaDocRequest& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t OID;
+  corbatext_t docType;
+  corbatext_t docFormat;
+};
+
+struct corbaDocResponse;
+typedef TVarVar<corbaDocResponse> corbaDocResponse_var;
+typedef TVarOut<corbaDocResponse> corbaDocResponse_out;
+
+struct corbaDocResponse {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaDocResponse_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaDocResponse();
+  ~corbaDocResponse();
+  corbaDocResponse( const corbaDocResponse& s );
+  corbaDocResponse& operator=( const corbaDocResponse& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t doc;
+};
+
+enum corbaFilterType {
+  booleanType = 0,
+  integerType,
+  enumeratedType,
+  stringType
+};
+
+typedef corbaFilterType& corbaFilterType_out;
+
+enum corbaFilterRepeatable {
+  onePerQuery = 0,
+  onePerTerm,
+  nPerTerm
+};
+
+typedef corbaFilterRepeatable& corbaFilterRepeatable_out;
+
+struct corbaFilterOption;
+typedef TVarVar<corbaFilterOption> corbaFilterOption_var;
+typedef TVarOut<corbaFilterOption> corbaFilterOption_out;
+
+struct corbaFilterOption {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaFilterOption_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaFilterOption();
+  ~corbaFilterOption();
+  corbaFilterOption( const corbaFilterOption& s );
+  corbaFilterOption& operator=( const corbaFilterOption& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t name;
+  corbaFilterType type;
+  corbaFilterRepeatable repeatable;
+  corbatext_t defaultValue;
+  corbatext_tarray validValues;
+};
+
+typedef SequenceTmpl<corbaFilterOption,MICO_TID_DEF> corbaFilterOptionList;
+#ifdef _WINDOWS
+static corbaFilterOptionList _dummy_corbaFilterOptionList;
+#endif
+typedef TSeqVar<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_var;
+typedef TSeqOut<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_out;
+
+struct corbaFilterOptionsResponse;
+typedef TVarVar<corbaFilterOptionsResponse> corbaFilterOptionsResponse_var;
+typedef TVarOut<corbaFilterOptionsResponse> corbaFilterOptionsResponse_out;
+
+struct corbaFilterOptionsResponse {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaFilterOptionsResponse_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaFilterOptionsResponse();
+  ~corbaFilterOptionsResponse();
+  corbaFilterOptionsResponse( const corbaFilterOptionsResponse& s );
+  corbaFilterOptionsResponse& operator=( const corbaFilterOptionsResponse& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbaFilterOptionList options;
+  corbatext_tarray names;
+};
+
+struct corbaOptionValue;
+typedef TVarVar<corbaOptionValue> corbaOptionValue_var;
+typedef TVarOut<corbaOptionValue> corbaOptionValue_out;
+
+struct corbaOptionValue {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaOptionValue_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaOptionValue();
+  ~corbaOptionValue();
+  corbaOptionValue( const corbaOptionValue& s );
+  corbaOptionValue& operator=( const corbaOptionValue& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t name;
+  corbatext_t value;
+};
+
+typedef SequenceTmpl<corbaOptionValue,MICO_TID_DEF> corbaOptionValue_array;
+#ifdef _WINDOWS
+static corbaOptionValue_array _dummy_corbaOptionValue_array;
+#endif
+typedef TSeqVar<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_var;
+typedef TSeqOut<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_out;
+
+struct corbaFilterRequest;
+typedef TVarVar<corbaFilterRequest> corbaFilterRequest_var;
+typedef TVarOut<corbaFilterRequest> corbaFilterRequest_out;
+
+struct corbaFilterRequest {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaFilterRequest_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaFilterRequest();
+  ~corbaFilterRequest();
+  corbaFilterRequest( const corbaFilterRequest& s );
+  corbaFilterRequest& operator=( const corbaFilterRequest& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t filter;
+  corbaOptionValue_array filterOptions;
+  corbatext_tarray docSet;
+  CORBA::Long filterResultOptions;
+  corbatext_t requestParams;
+  corbatext_t refParams;
+  corbatext_tset fields;
+  CORBA::Boolean getParents;
+};
+
+struct corbaTermInfo;
+typedef TVarVar<corbaTermInfo> corbaTermInfo_var;
+typedef TVarOut<corbaTermInfo> corbaTermInfo_out;
+
+struct corbaTermInfo {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaTermInfo_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaTermInfo();
+  ~corbaTermInfo();
+  corbaTermInfo( const corbaTermInfo& s );
+  corbaTermInfo& operator=( const corbaTermInfo& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t term;
+  CORBA::Long frequency;
+  corbatext_tarray matchTerms;
+};
+
+typedef SequenceTmpl<corbaTermInfo,MICO_TID_DEF> corbaTermInfo_array;
+#ifdef _WINDOWS
+static corbaTermInfo_array _dummy_corbaTermInfo_array;
+#endif
+typedef TSeqVar<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_var;
+typedef TSeqOut<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_out;
+
+struct corbaMetadataInfo;
+typedef TVarVar<corbaMetadataInfo> corbaMetadataInfo_var;
+typedef TVarOut<corbaMetadataInfo> corbaMetadataInfo_out;
+
+struct corbaMetadataInfo {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaMetadataInfo_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaMetadataInfo();
+  ~corbaMetadataInfo();
+  corbaMetadataInfo( const corbaMetadataInfo& s );
+  corbaMetadataInfo& operator=( const corbaMetadataInfo& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t params;
+  CORBA::Boolean isRef;
+  corbatext_tarray values;
+  CORBA::Long id;
+  CORBA::Long parentid;
+};
+
+typedef SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> corbaMetadataInfo_array;
+#ifdef _WINDOWS
+static corbaMetadataInfo_array _dummy_corbaMetadataInfo_array;
+#endif
+typedef TSeqVar<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_var;
+typedef TSeqOut<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_out;
+
+struct corbaMetadataInfo_map;
+typedef TVarVar<corbaMetadataInfo_map> corbaMetadataInfo_map_var;
+typedef TVarOut<corbaMetadataInfo_map> corbaMetadataInfo_map_out;
+
+struct corbaMetadataInfo_map {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaMetadataInfo_map_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaMetadataInfo_map();
+  ~corbaMetadataInfo_map();
+  corbaMetadataInfo_map( const corbaMetadataInfo_map& s );
+  corbaMetadataInfo_map& operator=( const corbaMetadataInfo_map& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_tarray names;
+  corbaMetadataInfo_array values;
+};
+
+typedef SequenceTmpl<CORBA::Long,MICO_TID_DEF> corbaDocFreq_array;
+#ifdef _WINDOWS
+static corbaDocFreq_array _dummy_corbaDocFreq_array;
+#endif
+typedef TSeqVar<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_var;
+typedef TSeqOut<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_out;
+
+struct corbaResultDocInfo;
+typedef TVarVar<corbaResultDocInfo> corbaResultDocInfo_var;
+typedef TVarOut<corbaResultDocInfo> corbaResultDocInfo_out;
+
+struct corbaResultDocInfo {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaResultDocInfo_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaResultDocInfo();
+  ~corbaResultDocInfo();
+  corbaResultDocInfo( const corbaResultDocInfo& s );
+  corbaResultDocInfo& operator=( const corbaResultDocInfo& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  corbatext_t OID;
+  CORBA::Long resultNum;
+  CORBA::Long ranking;
+  CORBA::Long termsMatched;
+  CORBA::Long phraseMatched;
+  corbaDocFreq_array docFreq;
+  corbaMetadataInfo_map metadata;
+  corbatext_t classifierMetadataType;
+  CORBA::Long classifierMetadataOffset;
+  corbaMetadataInfo_array metaparents;
+};
+
+typedef SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> corbaResultDocInfo_array;
+#ifdef _WINDOWS
+static corbaResultDocInfo_array _dummy_corbaResultDocInfo_array;
+#endif
+typedef TSeqVar<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_var;
+typedef TSeqOut<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_out;
+
+enum corbaIsApprox {
+  resultExact = 0,
+  resultApprox,
+  resultMany
+};
+
+typedef corbaIsApprox& corbaIsApprox_out;
+
+struct corbaFilterResponse;
+typedef TVarVar<corbaFilterResponse> corbaFilterResponse_var;
+typedef TVarOut<corbaFilterResponse> corbaFilterResponse_out;
+
+struct corbaFilterResponse {
+  #ifdef HAVE_TYPEDEF_OVERLOAD
+  typedef corbaFilterResponse_var _var_type;
+  #endif
+  #ifdef HAVE_EXPLICIT_STRUCT_OPS
+  corbaFilterResponse();
+  ~corbaFilterResponse();
+  corbaFilterResponse( const corbaFilterResponse& s );
+  corbaFilterResponse& operator=( const corbaFilterResponse& s );
+  #endif //HAVE_EXPLICIT_STRUCT_OPS
+
+  CORBA::Long numDocs;
+  corbaIsApprox isApprox;
+  corbaTermInfo_array termInfo;
+  corbaResultDocInfo_array docInfo;
+};
+
+class corbaiface;
+typedef corbaiface *corbaiface_ptr;
+typedef corbaiface_ptr corbaifaceRef;
+typedef ObjVar<corbaiface> corbaiface_var;
+typedef ObjOut<corbaiface> corbaiface_out;
+
+
+// Common definitions for interface corbaiface
+class corbaiface : 
+  virtual public CORBA::Object
+{
+  public:
+    virtual ~corbaiface();
+
+    #ifdef HAVE_TYPEDEF_OVERLOAD
+    typedef corbaiface_ptr _ptr_type;
+    typedef corbaiface_var _var_type;
+    #endif
+
+    static corbaiface_ptr _narrow( CORBA::Object_ptr obj );
+    static corbaiface_ptr _narrow( CORBA::AbstractBase_ptr obj );
+    static corbaiface_ptr _duplicate( corbaiface_ptr _obj )
+    {
+      CORBA::Object::_duplicate (_obj);
+      return _obj;
+    }
+
+    static corbaiface_ptr _nil()
+    {
+      return 0;
+    }
+
+    virtual void *_narrow_helper( const char *repoid );
+    static vector<CORBA::Narrow_proto> *_narrow_helpers;
+    static bool _narrow_helper2( CORBA::Object_ptr obj );
+
+    virtual CORBA::Boolean initialise( corbaComError& error ) = 0;
+    virtual void configure( const corbatext_t& key, const corbatext_tarray& cfgline, corbaComError& error ) = 0;
+    virtual void collectionList( corbatext_tarray& collist, corbaComError& error ) = 0;
+    virtual void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error ) = 0;
+    virtual void ping( const corbatext_t& collection, CORBA::Boolean& wasSuccess, corbaComError& error ) = 0;
+    virtual void getDocument( const corbatext_t& collection, corbaDocRequest& request, corbaDocResponse& response, corbaComError& error ) = 0;
+    virtual void getCollectInfo( const corbatext_t& collection, corbaColInfoResponse& response, corbaComError& error ) = 0;
+    virtual void getFilterInfo( const corbatext_t& collection, corbatext_tarray& filterNames, corbaComError& error ) = 0;
+    virtual void getFilterOptions( const corbatext_t& collection, const corbatext_t& option, corbaFilterOptionsResponse& response, corbaComError& error ) = 0;
+    virtual void filter( const corbatext_t& collection, const corbaFilterRequest& request, corbaFilterResponse& response, corbaComError& error ) = 0;
+
+  protected:
+    corbaiface() {};
+  private:
+    corbaiface( const corbaiface& );
+    void operator=( const corbaiface& );
+};
+
+// Stub for interface corbaiface
+class corbaiface_stub:
+  virtual public corbaiface
+{
+  public:
+    virtual ~corbaiface_stub();
+    CORBA::Boolean initialise( corbaComError& error );
+    void configure( const corbatext_t& key, const corbatext_tarray& cfgline, corbaComError& error );
+    void collectionList( corbatext_tarray& collist, corbaComError& error );
+    void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error );
+    void ping( const corbatext_t& collection, CORBA::Boolean& wasSuccess, corbaComError& error );
+    void getDocument( const corbatext_t& collection, corbaDocRequest& request, corbaDocResponse& response, corbaComError& error );
+    void getCollectInfo( const corbatext_t& collection, corbaColInfoResponse& response, corbaComError& error );
+    void getFilterInfo( const corbatext_t& collection, corbatext_tarray& filterNames, corbaComError& error );
+    void getFilterOptions( const corbatext_t& collection, const corbatext_t& option, corbaFilterOptionsResponse& response, corbaComError& error );
+    void filter( const corbatext_t& collection, const corbaFilterRequest& request, corbaFilterResponse& response, corbaComError& error );
+
+  private:
+    void operator=( const corbaiface_stub& );
+};
+
+class corbaiface_skel :
+  virtual public StaticMethodDispatcher,
+  virtual public corbaiface
+{
+  public:
+    corbaiface_skel( const CORBA::BOA::ReferenceData & = CORBA::BOA::ReferenceData() );
+    virtual ~corbaiface_skel();
+    corbaiface_skel( CORBA::Object_ptr obj );
+    virtual bool dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment &_env );
+    corbaiface_ptr _this();
+
+};
+
+#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_gsdlInterface)
+
+#ifndef MICO_NO_TOPLEVEL_MODULES
+
+} MICO_NAMESPACE_END_DECL
+#endif
+
+
+
+#ifndef MICO_CONF_NO_POA
+
+#endif // MICO_CONF_NO_POA
+
+#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbatext_t;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbatext_tmap;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaComError;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaShortColInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaColInfoResponse;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaDocRequest;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaDocResponse;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterType;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterRepeatable;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterOption;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterOptionsResponse;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaOptionValue;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterRequest;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaTermInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaMetadataInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaMetadataInfo_map;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaResultDocInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaIsApprox;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterResponse;
+
+extern CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaiface;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbatext_t;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaFilterOption;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaOptionValue;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaTermInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaMetadataInfo;
+
+extern CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaResultDocInfo;
+
+#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)
+
+
+#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
+#include <mico/template_impl.h>
+#endif
+
+#endif
Index: /gsdl/trunk/gs2runtime/src/corba/corbaiface.idl
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaiface.idl	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaiface.idl	(revision 16562)
@@ -0,0 +1,231 @@
+// basic elements for text
+
+module gsdlInterface {
+
+typedef sequence<unsigned short> usString;
+
+typedef sequence<string> stringSeq;
+
+struct corbatext_t
+{ 
+  usString text;
+  unsigned short encoding;
+  unsigned long  length;
+};
+
+typedef sequence<corbatext_t> corbatext_tarray;
+
+typedef corbatext_tarray corbatext_tset;
+
+struct corbatext_tmap
+{
+  corbatext_tarray names;
+  corbatext_tarray values;
+};
+
+// standard error values
+
+enum corbaComError
+{ corbaNoError, 
+  corbaAuthenticationFailure, 
+  corbaProtocolError, 
+  corbaConfigurationError, 
+  corbaSystemProblem
+};
+
+//
+// getColInfo response
+//
+
+struct corbaShortColInfo
+{
+  corbatext_t name;
+  corbatext_t host;
+  long        response;
+};
+
+struct corbaColInfoResponse
+{
+  boolean       useBook;
+  corbaShortColInfo shoftInfo;
+  boolean           isPublic;
+  boolean           isBeta;
+  unsigned long     buildDate;
+  corbatext_tarray  ccsCols;        // Added 05/04/2000
+  corbatext_tarray  languages;
+  unsigned long     numDocs;
+  unsigned long     numWords;
+  unsigned long     numBytes;
+  corbatext_tmap    collectionMeta;
+  corbatext_tmap    format;
+  corbatext_tmap    building;
+  corbatext_t       httpdomain ;    // Added 27/07/2000
+  corbatext_t       httpprefix;     // Added 27/07/2000
+  corbatext_t       receptionist;
+};
+
+//
+// getDocument request
+//
+
+struct corbaDocRequest
+{ 
+  corbatext_t OID;
+  corbatext_t docType;
+  corbatext_t docFormat;
+};
+
+//
+// getDocument response
+//
+
+struct corbaDocResponse
+{ 
+  corbatext_t doc;
+};
+
+enum corbaFilterType
+{
+  booleanType,
+  integerType,
+  enumeratedType,
+  stringType
+};
+
+enum corbaFilterRepeatable
+{
+  onePerQuery,
+  onePerTerm,
+  nPerTerm
+};
+
+struct corbaFilterOption
+{
+  corbatext_t           name;
+  corbaFilterType       type;
+  corbaFilterRepeatable repeatable;
+  corbatext_t           defaultValue;
+  corbatext_tarray      validValues;
+};
+
+typedef sequence<corbaFilterOption> corbaFilterOptionList;
+
+struct corbaFilterOptionsResponse
+{
+  corbaFilterOptionList options;
+  corbatext_tarray      names;
+};
+
+//
+// structures for filter call
+//
+
+struct corbaOptionValue
+{
+  corbatext_t name;
+  corbatext_t value;
+};
+
+typedef sequence<corbaOptionValue> corbaOptionValue_array;
+
+struct corbaFilterRequest
+{ 
+  corbatext_t            filter;
+  corbaOptionValue_array filterOptions;
+  corbatext_tarray       docSet;
+  long                   filterResultOptions;
+  corbatext_t            requestParams;
+  corbatext_t            refParams;
+  corbatext_tset         fields;
+  boolean                getParents;
+};
+
+struct corbaTermInfo
+{
+  corbatext_t      term;
+  long             frequency;
+  corbatext_tarray matchTerms;
+};
+
+typedef sequence<corbaTermInfo> corbaTermInfo_array;
+
+struct corbaMetadataInfo
+{
+  corbatext_t      params;
+  boolean          isRef;
+  corbatext_tarray values;
+  long             id;
+  long             parentid; // dodge for avoiding pointers for the moment
+};
+
+typedef sequence<corbaMetadataInfo> corbaMetadataInfo_array;
+
+struct corbaMetadataInfo_map
+{ 
+  corbatext_tarray        names;
+  corbaMetadataInfo_array values;
+};
+
+typedef sequence<long> corbaDocFreq_array;
+
+struct corbaResultDocInfo
+{
+  corbatext_t             OID;
+  long                    resultNum;
+  long                    ranking;
+  long                    termsMatched;
+  long                    phraseMatched;
+  corbaDocFreq_array      docFreq;
+  corbaMetadataInfo_map   metadata;
+  corbatext_t             classifierMetadataType;    // Added 05/04/2000
+  long                    classifierMetadataOffset;  // Added 05/04/2000
+  corbaMetadataInfo_array metaparents;
+};
+
+typedef sequence<corbaResultDocInfo> corbaResultDocInfo_array;
+
+enum corbaIsApprox
+{
+  resultExact,
+  resultApprox,
+  resultMany
+};
+
+struct corbaFilterResponse
+{
+  long                     numDocs;
+  corbaIsApprox            isApprox;
+  corbaTermInfo_array      termInfo;
+  corbaResultDocInfo_array docInfo;
+};
+
+interface corbaiface
+{
+  boolean   initialise(inout corbaComError error);
+  void      configure(in corbatext_t key, in corbatext_tarray cfgline,
+		      inout corbaComError error);
+  void      collectionList(inout corbatext_tarray collist,
+			   inout corbaComError error);
+  void      hasCollection(in corbatext_t corbaCollection, inout boolean has,
+		       inout corbaComError error);
+  void      ping(in corbatext_t collection, inout boolean wasSuccess, inout corbaComError error);
+  void      getDocument(in corbatext_t collection,
+			inout corbaDocRequest request, inout corbaDocResponse response,
+			inout corbaComError error);
+  void      getCollectInfo(in corbatext_t collection,
+			   inout corbaColInfoResponse response,
+			   inout corbaComError error);
+  void      getFilterInfo(in corbatext_t collection, 
+                          inout corbatext_tarray filterNames, 
+			  inout corbaComError error);
+  void      getFilterOptions(in corbatext_t collection,
+                             in corbatext_t option,
+                             inout corbaFilterOptionsResponse response,
+			     inout corbaComError error);
+  void      filter(in corbatext_t collection,
+		   in corbaFilterRequest request,
+                   inout corbaFilterResponse response,
+                   inout corbaComError error);
+};
+
+};
Index: /gsdl/trunk/gs2runtime/src/corba/corbaiface.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaiface.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaiface.mpp	(revision 16562)
@@ -0,0 +1,2000 @@
+/*
+ *  MICO --- a free CORBA implementation
+ *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
+ *
+ *  This file was automatically generated. DO NOT EDIT!
+ */
+
+#include "corbaiface.h"
+
+//--------------------------------------------------------
+//  Implementation of stubs
+//--------------------------------------------------------
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbatext_t::corbatext_t()
+{
+}
+
+gsdlInterface::corbatext_t::corbatext_t( const corbatext_t& _s )
+{
+  text = ((corbatext_t&)_s).text;
+  encoding = ((corbatext_t&)_s).encoding;
+  length = ((corbatext_t&)_s).length;
+}
+
+gsdlInterface::corbatext_t::~corbatext_t()
+{
+}
+
+gsdlInterface::corbatext_t&
+gsdlInterface::corbatext_t::operator=( const corbatext_t& _s )
+{
+  text = ((corbatext_t&)_s).text;
+  encoding = ((corbatext_t&)_s).encoding;
+  length = ((corbatext_t&)_s).length;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbatext_t : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbatext_t _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbatext_t::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbatext_t::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbatext_t::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbatext_t::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    CORBA::_stcseq_ushort->demarshal( dc, &((_MICO_T*)v)->text ) &&
+    CORBA::_stc_ushort->demarshal( dc, &((_MICO_T*)v)->encoding ) &&
+    CORBA::_stc_ulong->demarshal( dc, &((_MICO_T*)v)->length ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbatext_t::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  CORBA::_stcseq_ushort->marshal( ec, &((_MICO_T*)v)->text );
+  CORBA::_stc_ushort->marshal( ec, &((_MICO_T*)v)->encoding );
+  CORBA::_stc_ulong->marshal( ec, &((_MICO_T*)v)->length );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbatext_t;
+
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbatext_tmap::corbatext_tmap()
+{
+}
+
+gsdlInterface::corbatext_tmap::corbatext_tmap( const corbatext_tmap& _s )
+{
+  names = ((corbatext_tmap&)_s).names;
+  values = ((corbatext_tmap&)_s).values;
+}
+
+gsdlInterface::corbatext_tmap::~corbatext_tmap()
+{
+}
+
+gsdlInterface::corbatext_tmap&
+gsdlInterface::corbatext_tmap::operator=( const corbatext_tmap& _s )
+{
+  names = ((corbatext_tmap&)_s).names;
+  values = ((corbatext_tmap&)_s).values;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbatext_tmap : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbatext_tmap _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbatext_tmap::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbatext_tmap::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbatext_tmap::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbatext_tmap::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->names ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->values ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbatext_tmap::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->names );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->values );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbatext_tmap;
+
+
+class _Marshaller_gsdlInterface_corbaComError : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaComError _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaComError::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaComError::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaComError::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaComError::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong ul;
+  if( !dc.enumeration( ul ) )
+    return FALSE;
+  *(_MICO_T*) v = (_MICO_T) ul;
+  return TRUE;
+}
+
+void _Marshaller_gsdlInterface_corbaComError::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.enumeration( (CORBA::ULong) *(_MICO_T *) v );
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaComError;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaShortColInfo::corbaShortColInfo()
+{
+}
+
+gsdlInterface::corbaShortColInfo::corbaShortColInfo( const corbaShortColInfo& _s )
+{
+  name = ((corbaShortColInfo&)_s).name;
+  host = ((corbaShortColInfo&)_s).host;
+  response = ((corbaShortColInfo&)_s).response;
+}
+
+gsdlInterface::corbaShortColInfo::~corbaShortColInfo()
+{
+}
+
+gsdlInterface::corbaShortColInfo&
+gsdlInterface::corbaShortColInfo::operator=( const corbaShortColInfo& _s )
+{
+  name = ((corbaShortColInfo&)_s).name;
+  host = ((corbaShortColInfo&)_s).host;
+  response = ((corbaShortColInfo&)_s).response;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaShortColInfo : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaShortColInfo _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaShortColInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaShortColInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaShortColInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaShortColInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->name ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->host ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->response ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaShortColInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->name );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->host );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->response );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaShortColInfo;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaColInfoResponse::corbaColInfoResponse()
+{
+}
+
+gsdlInterface::corbaColInfoResponse::corbaColInfoResponse( const corbaColInfoResponse& _s )
+{
+  shoftInfo = ((corbaColInfoResponse&)_s).shoftInfo;
+  useBook = ((corbaColInfoResponse&)_s).useBook;
+  isPublic = ((corbaColInfoResponse&)_s).isPublic;
+  isBeta = ((corbaColInfoResponse&)_s).isBeta;
+  buildDate = ((corbaColInfoResponse&)_s).buildDate;
+  ccsCols = ((corbaColInfoResponse&)_s).ccsCols;
+  languages = ((corbaColInfoResponse&)_s).languages;
+  numDocs = ((corbaColInfoResponse&)_s).numDocs;
+  numWords = ((corbaColInfoResponse&)_s).numWords;
+  numBytes = ((corbaColInfoResponse&)_s).numBytes;
+  collectionMeta = ((corbaColInfoResponse&)_s).collectionMeta;
+  format = ((corbaColInfoResponse&)_s).format;
+  building = ((corbaColInfoResponse&)_s).building;
+  httpdomain = ((corbaColInfoResponse&)_s).httpdomain;
+  httpprefix = ((corbaColInfoResponse&)_s).httpprefix;
+  receptionist = ((corbaColInfoResponse&)_s).receptionist;
+}
+
+gsdlInterface::corbaColInfoResponse::~corbaColInfoResponse()
+{
+}
+
+gsdlInterface::corbaColInfoResponse&
+gsdlInterface::corbaColInfoResponse::operator=( const corbaColInfoResponse& _s )
+{
+  shoftInfo = ((corbaColInfoResponse&)_s).shoftInfo;
+  useBook = ((corbaColInfoResponse&)_s).useBook;
+  isPublic = ((corbaColInfoResponse&)_s).isPublic;
+  isBeta = ((corbaColInfoResponse&)_s).isBeta;
+  buildDate = ((corbaColInfoResponse&)_s).buildDate;
+  ccsCols = ((corbaColInfoResponse&)_s).ccsCols;
+  languages = ((corbaColInfoResponse&)_s).languages;
+  numDocs = ((corbaColInfoResponse&)_s).numDocs;
+  numWords = ((corbaColInfoResponse&)_s).numWords;
+  numBytes = ((corbaColInfoResponse&)_s).numBytes;
+  collectionMeta = ((corbaColInfoResponse&)_s).collectionMeta;
+  format = ((corbaColInfoResponse&)_s).format;
+  building = ((corbaColInfoResponse&)_s).building;
+  httpdomain = ((corbaColInfoResponse&)_s).httpdomain;
+  httpprefix = ((corbaColInfoResponse&)_s).httpprefix;
+  receptionist = ((corbaColInfoResponse&)_s).receptionist;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaColInfoResponse : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaColInfoResponse _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaColInfoResponse::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaColInfoResponse::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaColInfoResponse::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaColInfoResponse::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbaShortColInfo->demarshal( dc, &((_MICO_T*)v)->shoftInfo ) &&
+    CORBA::_stc_boolean->demarshal( dc, &((_MICO_T*)v)->useBook ) &&
+    CORBA::_stc_boolean->demarshal( dc, &((_MICO_T*)v)->isPublic ) &&
+    CORBA::_stc_boolean->demarshal( dc, &((_MICO_T*)v)->isBeta ) &&
+    CORBA::_stc_ulong->demarshal( dc, &((_MICO_T*)v)->buildDate ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->ccsCols ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->languages ) &&
+    CORBA::_stc_ulong->demarshal( dc, &((_MICO_T*)v)->numDocs ) &&
+    CORBA::_stc_ulong->demarshal( dc, &((_MICO_T*)v)->numWords ) &&
+    CORBA::_stc_ulong->demarshal( dc, &((_MICO_T*)v)->numBytes ) &&
+    _marshaller_gsdlInterface_corbatext_tmap->demarshal( dc, &((_MICO_T*)v)->collectionMeta ) &&
+    _marshaller_gsdlInterface_corbatext_tmap->demarshal( dc, &((_MICO_T*)v)->format ) &&
+    _marshaller_gsdlInterface_corbatext_tmap->demarshal( dc, &((_MICO_T*)v)->building ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->httpdomain ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->httpprefix ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->receptionist ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaColInfoResponse::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbaShortColInfo->marshal( ec, &((_MICO_T*)v)->shoftInfo );
+  CORBA::_stc_boolean->marshal( ec, &((_MICO_T*)v)->useBook );
+  CORBA::_stc_boolean->marshal( ec, &((_MICO_T*)v)->isPublic );
+  CORBA::_stc_boolean->marshal( ec, &((_MICO_T*)v)->isBeta );
+  CORBA::_stc_ulong->marshal( ec, &((_MICO_T*)v)->buildDate );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->ccsCols );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->languages );
+  CORBA::_stc_ulong->marshal( ec, &((_MICO_T*)v)->numDocs );
+  CORBA::_stc_ulong->marshal( ec, &((_MICO_T*)v)->numWords );
+  CORBA::_stc_ulong->marshal( ec, &((_MICO_T*)v)->numBytes );
+  _marshaller_gsdlInterface_corbatext_tmap->marshal( ec, &((_MICO_T*)v)->collectionMeta );
+  _marshaller_gsdlInterface_corbatext_tmap->marshal( ec, &((_MICO_T*)v)->format );
+  _marshaller_gsdlInterface_corbatext_tmap->marshal( ec, &((_MICO_T*)v)->building );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->httpdomain );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->httpprefix );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->receptionist );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaColInfoResponse;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaDocRequest::corbaDocRequest()
+{
+}
+
+gsdlInterface::corbaDocRequest::corbaDocRequest( const corbaDocRequest& _s )
+{
+  OID = ((corbaDocRequest&)_s).OID;
+  docType = ((corbaDocRequest&)_s).docType;
+  docFormat = ((corbaDocRequest&)_s).docFormat;
+}
+
+gsdlInterface::corbaDocRequest::~corbaDocRequest()
+{
+}
+
+gsdlInterface::corbaDocRequest&
+gsdlInterface::corbaDocRequest::operator=( const corbaDocRequest& _s )
+{
+  OID = ((corbaDocRequest&)_s).OID;
+  docType = ((corbaDocRequest&)_s).docType;
+  docFormat = ((corbaDocRequest&)_s).docFormat;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaDocRequest : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaDocRequest _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaDocRequest::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaDocRequest::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaDocRequest::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaDocRequest::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->OID ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->docType ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->docFormat ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaDocRequest::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->OID );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->docType );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->docFormat );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaDocRequest;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaDocResponse::corbaDocResponse()
+{
+}
+
+gsdlInterface::corbaDocResponse::corbaDocResponse( const corbaDocResponse& _s )
+{
+  doc = ((corbaDocResponse&)_s).doc;
+}
+
+gsdlInterface::corbaDocResponse::~corbaDocResponse()
+{
+}
+
+gsdlInterface::corbaDocResponse&
+gsdlInterface::corbaDocResponse::operator=( const corbaDocResponse& _s )
+{
+  doc = ((corbaDocResponse&)_s).doc;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaDocResponse : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaDocResponse _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaDocResponse::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaDocResponse::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaDocResponse::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaDocResponse::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->doc ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaDocResponse::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->doc );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaDocResponse;
+
+
+class _Marshaller_gsdlInterface_corbaFilterType : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterType _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterType::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterType::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterType::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterType::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong ul;
+  if( !dc.enumeration( ul ) )
+    return FALSE;
+  *(_MICO_T*) v = (_MICO_T) ul;
+  return TRUE;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterType::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.enumeration( (CORBA::ULong) *(_MICO_T *) v );
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterType;
+
+
+class _Marshaller_gsdlInterface_corbaFilterRepeatable : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterRepeatable _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterRepeatable::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRepeatable::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRepeatable::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterRepeatable::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong ul;
+  if( !dc.enumeration( ul ) )
+    return FALSE;
+  *(_MICO_T*) v = (_MICO_T) ul;
+  return TRUE;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRepeatable::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.enumeration( (CORBA::ULong) *(_MICO_T *) v );
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterRepeatable;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaFilterOption::corbaFilterOption()
+{
+}
+
+gsdlInterface::corbaFilterOption::corbaFilterOption( const corbaFilterOption& _s )
+{
+  name = ((corbaFilterOption&)_s).name;
+  type = ((corbaFilterOption&)_s).type;
+  repeatable = ((corbaFilterOption&)_s).repeatable;
+  defaultValue = ((corbaFilterOption&)_s).defaultValue;
+  validValues = ((corbaFilterOption&)_s).validValues;
+}
+
+gsdlInterface::corbaFilterOption::~corbaFilterOption()
+{
+}
+
+gsdlInterface::corbaFilterOption&
+gsdlInterface::corbaFilterOption::operator=( const corbaFilterOption& _s )
+{
+  name = ((corbaFilterOption&)_s).name;
+  type = ((corbaFilterOption&)_s).type;
+  repeatable = ((corbaFilterOption&)_s).repeatable;
+  defaultValue = ((corbaFilterOption&)_s).defaultValue;
+  validValues = ((corbaFilterOption&)_s).validValues;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaFilterOption : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterOption _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterOption::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOption::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOption::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterOption::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->name ) &&
+    _marshaller_gsdlInterface_corbaFilterType->demarshal( dc, &((_MICO_T*)v)->type ) &&
+    _marshaller_gsdlInterface_corbaFilterRepeatable->demarshal( dc, &((_MICO_T*)v)->repeatable ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->defaultValue ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->validValues ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOption::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->name );
+  _marshaller_gsdlInterface_corbaFilterType->marshal( ec, &((_MICO_T*)v)->type );
+  _marshaller_gsdlInterface_corbaFilterRepeatable->marshal( ec, &((_MICO_T*)v)->repeatable );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->defaultValue );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->validValues );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterOption;
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaFilterOptionsResponse::corbaFilterOptionsResponse()
+{
+}
+
+gsdlInterface::corbaFilterOptionsResponse::corbaFilterOptionsResponse( const corbaFilterOptionsResponse& _s )
+{
+  options = ((corbaFilterOptionsResponse&)_s).options;
+  names = ((corbaFilterOptionsResponse&)_s).names;
+}
+
+gsdlInterface::corbaFilterOptionsResponse::~corbaFilterOptionsResponse()
+{
+}
+
+gsdlInterface::corbaFilterOptionsResponse&
+gsdlInterface::corbaFilterOptionsResponse::operator=( const corbaFilterOptionsResponse& _s )
+{
+  options = ((corbaFilterOptionsResponse&)_s).options;
+  names = ((corbaFilterOptionsResponse&)_s).names;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaFilterOptionsResponse : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterOptionsResponse _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterOptionsResponse::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOptionsResponse::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOptionsResponse::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterOptionsResponse::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller__seq_gsdlInterface_corbaFilterOption->demarshal( dc, &((_MICO_T*)v)->options ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->names ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaFilterOptionsResponse::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller__seq_gsdlInterface_corbaFilterOption->marshal( ec, &((_MICO_T*)v)->options );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->names );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterOptionsResponse;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaOptionValue::corbaOptionValue()
+{
+}
+
+gsdlInterface::corbaOptionValue::corbaOptionValue( const corbaOptionValue& _s )
+{
+  name = ((corbaOptionValue&)_s).name;
+  value = ((corbaOptionValue&)_s).value;
+}
+
+gsdlInterface::corbaOptionValue::~corbaOptionValue()
+{
+}
+
+gsdlInterface::corbaOptionValue&
+gsdlInterface::corbaOptionValue::operator=( const corbaOptionValue& _s )
+{
+  name = ((corbaOptionValue&)_s).name;
+  value = ((corbaOptionValue&)_s).value;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaOptionValue : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaOptionValue _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaOptionValue::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaOptionValue::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaOptionValue::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaOptionValue::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->name ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->value ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaOptionValue::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->name );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->value );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaOptionValue;
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaFilterRequest::corbaFilterRequest()
+{
+}
+
+gsdlInterface::corbaFilterRequest::corbaFilterRequest( const corbaFilterRequest& _s )
+{
+  filter = ((corbaFilterRequest&)_s).filter;
+  filterOptions = ((corbaFilterRequest&)_s).filterOptions;
+  docSet = ((corbaFilterRequest&)_s).docSet;
+  filterResultOptions = ((corbaFilterRequest&)_s).filterResultOptions;
+  requestParams = ((corbaFilterRequest&)_s).requestParams;
+  refParams = ((corbaFilterRequest&)_s).refParams;
+  fields = ((corbaFilterRequest&)_s).fields;
+  getParents = ((corbaFilterRequest&)_s).getParents;
+}
+
+gsdlInterface::corbaFilterRequest::~corbaFilterRequest()
+{
+}
+
+gsdlInterface::corbaFilterRequest&
+gsdlInterface::corbaFilterRequest::operator=( const corbaFilterRequest& _s )
+{
+  filter = ((corbaFilterRequest&)_s).filter;
+  filterOptions = ((corbaFilterRequest&)_s).filterOptions;
+  docSet = ((corbaFilterRequest&)_s).docSet;
+  filterResultOptions = ((corbaFilterRequest&)_s).filterResultOptions;
+  requestParams = ((corbaFilterRequest&)_s).requestParams;
+  refParams = ((corbaFilterRequest&)_s).refParams;
+  fields = ((corbaFilterRequest&)_s).fields;
+  getParents = ((corbaFilterRequest&)_s).getParents;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaFilterRequest : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterRequest _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterRequest::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRequest::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRequest::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterRequest::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->filter ) &&
+    _marshaller__seq_gsdlInterface_corbaOptionValue->demarshal( dc, &((_MICO_T*)v)->filterOptions ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->docSet ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->filterResultOptions ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->requestParams ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->refParams ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->fields ) &&
+    CORBA::_stc_boolean->demarshal( dc, &((_MICO_T*)v)->getParents ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaFilterRequest::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->filter );
+  _marshaller__seq_gsdlInterface_corbaOptionValue->marshal( ec, &((_MICO_T*)v)->filterOptions );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->docSet );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->filterResultOptions );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->requestParams );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->refParams );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->fields );
+  CORBA::_stc_boolean->marshal( ec, &((_MICO_T*)v)->getParents );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterRequest;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaTermInfo::corbaTermInfo()
+{
+}
+
+gsdlInterface::corbaTermInfo::corbaTermInfo( const corbaTermInfo& _s )
+{
+  term = ((corbaTermInfo&)_s).term;
+  frequency = ((corbaTermInfo&)_s).frequency;
+  matchTerms = ((corbaTermInfo&)_s).matchTerms;
+}
+
+gsdlInterface::corbaTermInfo::~corbaTermInfo()
+{
+}
+
+gsdlInterface::corbaTermInfo&
+gsdlInterface::corbaTermInfo::operator=( const corbaTermInfo& _s )
+{
+  term = ((corbaTermInfo&)_s).term;
+  frequency = ((corbaTermInfo&)_s).frequency;
+  matchTerms = ((corbaTermInfo&)_s).matchTerms;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaTermInfo : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaTermInfo _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaTermInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaTermInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaTermInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaTermInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->term ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->frequency ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->matchTerms ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaTermInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->term );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->frequency );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->matchTerms );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaTermInfo;
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaMetadataInfo::corbaMetadataInfo()
+{
+}
+
+gsdlInterface::corbaMetadataInfo::corbaMetadataInfo( const corbaMetadataInfo& _s )
+{
+  params = ((corbaMetadataInfo&)_s).params;
+  isRef = ((corbaMetadataInfo&)_s).isRef;
+  values = ((corbaMetadataInfo&)_s).values;
+  id = ((corbaMetadataInfo&)_s).id;
+  parentid = ((corbaMetadataInfo&)_s).parentid;
+}
+
+gsdlInterface::corbaMetadataInfo::~corbaMetadataInfo()
+{
+}
+
+gsdlInterface::corbaMetadataInfo&
+gsdlInterface::corbaMetadataInfo::operator=( const corbaMetadataInfo& _s )
+{
+  params = ((corbaMetadataInfo&)_s).params;
+  isRef = ((corbaMetadataInfo&)_s).isRef;
+  values = ((corbaMetadataInfo&)_s).values;
+  id = ((corbaMetadataInfo&)_s).id;
+  parentid = ((corbaMetadataInfo&)_s).parentid;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaMetadataInfo : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaMetadataInfo _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaMetadataInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaMetadataInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->params ) &&
+    CORBA::_stc_boolean->demarshal( dc, &((_MICO_T*)v)->isRef ) &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->values ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->id ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->parentid ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->params );
+  CORBA::_stc_boolean->marshal( ec, &((_MICO_T*)v)->isRef );
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->values );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->id );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->parentid );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaMetadataInfo;
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaMetadataInfo_map::corbaMetadataInfo_map()
+{
+}
+
+gsdlInterface::corbaMetadataInfo_map::corbaMetadataInfo_map( const corbaMetadataInfo_map& _s )
+{
+  names = ((corbaMetadataInfo_map&)_s).names;
+  values = ((corbaMetadataInfo_map&)_s).values;
+}
+
+gsdlInterface::corbaMetadataInfo_map::~corbaMetadataInfo_map()
+{
+}
+
+gsdlInterface::corbaMetadataInfo_map&
+gsdlInterface::corbaMetadataInfo_map::operator=( const corbaMetadataInfo_map& _s )
+{
+  names = ((corbaMetadataInfo_map&)_s).names;
+  values = ((corbaMetadataInfo_map&)_s).values;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaMetadataInfo_map : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaMetadataInfo_map _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaMetadataInfo_map::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo_map::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo_map::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaMetadataInfo_map::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller__seq_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->names ) &&
+    _marshaller__seq_gsdlInterface_corbaMetadataInfo->demarshal( dc, &((_MICO_T*)v)->values ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaMetadataInfo_map::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller__seq_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->names );
+  _marshaller__seq_gsdlInterface_corbaMetadataInfo->marshal( ec, &((_MICO_T*)v)->values );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaMetadataInfo_map;
+
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaResultDocInfo::corbaResultDocInfo()
+{
+}
+
+gsdlInterface::corbaResultDocInfo::corbaResultDocInfo( const corbaResultDocInfo& _s )
+{
+  OID = ((corbaResultDocInfo&)_s).OID;
+  resultNum = ((corbaResultDocInfo&)_s).resultNum;
+  ranking = ((corbaResultDocInfo&)_s).ranking;
+  termsMatched = ((corbaResultDocInfo&)_s).termsMatched;
+  phraseMatched = ((corbaResultDocInfo&)_s).phraseMatched;
+  docFreq = ((corbaResultDocInfo&)_s).docFreq;
+  metadata = ((corbaResultDocInfo&)_s).metadata;
+  classifierMetadataType = ((corbaResultDocInfo&)_s).classifierMetadataType;
+  classifierMetadataOffset = ((corbaResultDocInfo&)_s).classifierMetadataOffset;
+  metaparents = ((corbaResultDocInfo&)_s).metaparents;
+}
+
+gsdlInterface::corbaResultDocInfo::~corbaResultDocInfo()
+{
+}
+
+gsdlInterface::corbaResultDocInfo&
+gsdlInterface::corbaResultDocInfo::operator=( const corbaResultDocInfo& _s )
+{
+  OID = ((corbaResultDocInfo&)_s).OID;
+  resultNum = ((corbaResultDocInfo&)_s).resultNum;
+  ranking = ((corbaResultDocInfo&)_s).ranking;
+  termsMatched = ((corbaResultDocInfo&)_s).termsMatched;
+  phraseMatched = ((corbaResultDocInfo&)_s).phraseMatched;
+  docFreq = ((corbaResultDocInfo&)_s).docFreq;
+  metadata = ((corbaResultDocInfo&)_s).metadata;
+  classifierMetadataType = ((corbaResultDocInfo&)_s).classifierMetadataType;
+  classifierMetadataOffset = ((corbaResultDocInfo&)_s).classifierMetadataOffset;
+  metaparents = ((corbaResultDocInfo&)_s).metaparents;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaResultDocInfo : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaResultDocInfo _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaResultDocInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaResultDocInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaResultDocInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaResultDocInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->OID ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->resultNum ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->ranking ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->termsMatched ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->phraseMatched ) &&
+    CORBA::_stcseq_long->demarshal( dc, &((_MICO_T*)v)->docFreq ) &&
+    _marshaller_gsdlInterface_corbaMetadataInfo_map->demarshal( dc, &((_MICO_T*)v)->metadata ) &&
+    _marshaller_gsdlInterface_corbatext_t->demarshal( dc, &((_MICO_T*)v)->classifierMetadataType ) &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->classifierMetadataOffset ) &&
+    _marshaller__seq_gsdlInterface_corbaMetadataInfo->demarshal( dc, &((_MICO_T*)v)->metaparents ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaResultDocInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->OID );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->resultNum );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->ranking );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->termsMatched );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->phraseMatched );
+  CORBA::_stcseq_long->marshal( ec, &((_MICO_T*)v)->docFreq );
+  _marshaller_gsdlInterface_corbaMetadataInfo_map->marshal( ec, &((_MICO_T*)v)->metadata );
+  _marshaller_gsdlInterface_corbatext_t->marshal( ec, &((_MICO_T*)v)->classifierMetadataType );
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->classifierMetadataOffset );
+  _marshaller__seq_gsdlInterface_corbaMetadataInfo->marshal( ec, &((_MICO_T*)v)->metaparents );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaResultDocInfo;
+
+
+
+class _Marshaller_gsdlInterface_corbaIsApprox : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaIsApprox _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaIsApprox::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaIsApprox::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaIsApprox::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaIsApprox::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong ul;
+  if( !dc.enumeration( ul ) )
+    return FALSE;
+  *(_MICO_T*) v = (_MICO_T) ul;
+  return TRUE;
+}
+
+void _Marshaller_gsdlInterface_corbaIsApprox::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.enumeration( (CORBA::ULong) *(_MICO_T *) v );
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaIsApprox;
+
+#ifdef HAVE_EXPLICIT_STRUCT_OPS
+gsdlInterface::corbaFilterResponse::corbaFilterResponse()
+{
+}
+
+gsdlInterface::corbaFilterResponse::corbaFilterResponse( const corbaFilterResponse& _s )
+{
+  numDocs = ((corbaFilterResponse&)_s).numDocs;
+  isApprox = ((corbaFilterResponse&)_s).isApprox;
+  termInfo = ((corbaFilterResponse&)_s).termInfo;
+  docInfo = ((corbaFilterResponse&)_s).docInfo;
+}
+
+gsdlInterface::corbaFilterResponse::~corbaFilterResponse()
+{
+}
+
+gsdlInterface::corbaFilterResponse&
+gsdlInterface::corbaFilterResponse::operator=( const corbaFilterResponse& _s )
+{
+  numDocs = ((corbaFilterResponse&)_s).numDocs;
+  isApprox = ((corbaFilterResponse&)_s).isApprox;
+  termInfo = ((corbaFilterResponse&)_s).termInfo;
+  docInfo = ((corbaFilterResponse&)_s).docInfo;
+  return *this;
+}
+#endif
+
+class _Marshaller_gsdlInterface_corbaFilterResponse : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaFilterResponse _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaFilterResponse::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterResponse::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller_gsdlInterface_corbaFilterResponse::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaFilterResponse::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  return
+    dc.struct_begin() &&
+    CORBA::_stc_long->demarshal( dc, &((_MICO_T*)v)->numDocs ) &&
+    _marshaller_gsdlInterface_corbaIsApprox->demarshal( dc, &((_MICO_T*)v)->isApprox ) &&
+    _marshaller__seq_gsdlInterface_corbaTermInfo->demarshal( dc, &((_MICO_T*)v)->termInfo ) &&
+    _marshaller__seq_gsdlInterface_corbaResultDocInfo->demarshal( dc, &((_MICO_T*)v)->docInfo ) &&
+    dc.struct_end();
+}
+
+void _Marshaller_gsdlInterface_corbaFilterResponse::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  ec.struct_begin();
+  CORBA::_stc_long->marshal( ec, &((_MICO_T*)v)->numDocs );
+  _marshaller_gsdlInterface_corbaIsApprox->marshal( ec, &((_MICO_T*)v)->isApprox );
+  _marshaller__seq_gsdlInterface_corbaTermInfo->marshal( ec, &((_MICO_T*)v)->termInfo );
+  _marshaller__seq_gsdlInterface_corbaResultDocInfo->marshal( ec, &((_MICO_T*)v)->docInfo );
+  ec.struct_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaFilterResponse;
+
+
+// Stub interface corbaiface
+gsdlInterface::corbaiface::~corbaiface()
+{
+}
+
+void *gsdlInterface::corbaiface::_narrow_helper( const char *_rid )
+{
+  if( strcmp( _rid, "IDL:gsdlInterface/corbaiface:1.0" ) == 0 )
+    return (void *)this;
+  return NULL;
+}
+
+bool gsdlInterface::corbaiface::_narrow_helper2( CORBA::Object_ptr _obj )
+{
+  if( strcmp( _obj->_repoid(), "IDL:gsdlInterface/corbaiface:1.0" ) == 0) {
+    return true;
+  }
+  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
+       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
+    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
+    if( _res )
+      return true;
+  }
+  return false;
+}
+
+gsdlInterface::corbaiface_ptr gsdlInterface::corbaiface::_narrow( CORBA::Object_ptr _obj )
+{
+  gsdlInterface::corbaiface_ptr _o;
+  if( !CORBA::is_nil( _obj ) ) {
+    void *_p;
+    if( (_p = _obj->_narrow_helper( "IDL:gsdlInterface/corbaiface:1.0" )))
+      return _duplicate( (gsdlInterface::corbaiface_ptr) _p );
+    if( _narrow_helper2( _obj ) ||
+       ( _obj->_is_a_remote( "IDL:gsdlInterface/corbaiface:1.0" ) ) ) {
+      _o = new gsdlInterface::corbaiface_stub;
+      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
+      return _o;
+    }
+  }
+  return _nil();
+}
+
+gsdlInterface::corbaiface_ptr
+gsdlInterface::corbaiface::_narrow( CORBA::AbstractBase_ptr _obj )
+{
+  return _narrow (_obj->_to_object());
+}
+
+gsdlInterface::corbaiface_stub::~corbaiface_stub()
+{
+}
+
+CORBA::Boolean gsdlInterface::corbaiface_stub::initialise( gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::Boolean _res;
+  CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
+
+  CORBA::StaticRequest __req( this, "initialise" );
+  __req.add_inout_arg( &_error );
+  __req.set_result( &__res );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+  return _res;
+}
+
+
+void gsdlInterface::corbaiface_stub::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key );
+  CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "configure" );
+  __req.add_in_arg( &_key );
+  __req.add_in_arg( &_cfgline );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "collectionList" );
+  __req.add_inout_arg( &_collist );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _corbaCollection( _marshaller_gsdlInterface_corbatext_t, &corbaCollection );
+  CORBA::StaticAny _has( CORBA::_stc_boolean, &has );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "hasCollection" );
+  __req.add_in_arg( &_corbaCollection );
+  __req.add_inout_arg( &_has );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::ping( const gsdlInterface::corbatext_t& collection, CORBA::Boolean& wasSuccess, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _wasSuccess( CORBA::_stc_boolean, &wasSuccess );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "ping" );
+  __req.add_in_arg( &_collection );
+  __req.add_inout_arg( &_wasSuccess );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaDocRequest, &request );
+  CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaDocResponse, &response );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "getDocument" );
+  __req.add_in_arg( &_collection );
+  __req.add_inout_arg( &_request );
+  __req.add_inout_arg( &_response );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaColInfoResponse, &response );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "getCollectInfo" );
+  __req.add_in_arg( &_collection );
+  __req.add_inout_arg( &_response );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _filterNames( _marshaller__seq_gsdlInterface_corbatext_t, &filterNames );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "getFilterInfo" );
+  __req.add_in_arg( &_collection );
+  __req.add_inout_arg( &_filterNames );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _option( _marshaller_gsdlInterface_corbatext_t, &option );
+  CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterOptionsResponse, &response );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "getFilterOptions" );
+  __req.add_in_arg( &_collection );
+  __req.add_in_arg( &_option );
+  __req.add_inout_arg( &_response );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+void gsdlInterface::corbaiface_stub::filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error )
+{
+  CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+  CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaFilterRequest, &request );
+  CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterResponse, &response );
+  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+  CORBA::StaticRequest __req( this, "filter" );
+  __req.add_in_arg( &_collection );
+  __req.add_in_arg( &_request );
+  __req.add_inout_arg( &_response );
+  __req.add_inout_arg( &_error );
+
+  __req.invoke();
+
+  mico_sii_throw( &__req, 
+    0);
+}
+
+
+#ifdef HAVE_NAMESPACE
+namespace gsdlInterface { vector<CORBA::Narrow_proto> * corbaiface::_narrow_helpers; }
+#else
+vector<CORBA::Narrow_proto> * gsdlInterface::corbaiface::_narrow_helpers;
+#endif
+
+class _Marshaller_gsdlInterface_corbaiface : public CORBA::StaticTypeInfo {
+    typedef gsdlInterface::corbaiface_ptr _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller_gsdlInterface_corbaiface::create() const
+{
+  return (StaticValueType) new _MICO_T( 0 );
+}
+
+void _Marshaller_gsdlInterface_corbaiface::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = ::gsdlInterface::corbaiface::_duplicate( *(_MICO_T*) s );
+}
+
+void _Marshaller_gsdlInterface_corbaiface::free( StaticValueType v ) const
+{
+  CORBA::release( *(_MICO_T *) v );
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller_gsdlInterface_corbaiface::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::Object_ptr obj;
+  if (!CORBA::_stc_Object->demarshal(dc, &obj))
+    return FALSE;
+  *(_MICO_T *) v = ::gsdlInterface::corbaiface::_narrow( obj );
+  CORBA::Boolean ret = CORBA::is_nil (obj) || !CORBA::is_nil (*(_MICO_T *)v);
+  CORBA::release (obj);
+  return ret;
+}
+
+void _Marshaller_gsdlInterface_corbaiface::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::Object_ptr obj = *(_MICO_T *) v;
+  CORBA::_stc_Object->marshal( ec, &obj );
+}
+
+CORBA::StaticTypeInfo *_marshaller_gsdlInterface_corbaiface;
+
+class _Marshaller__seq_gsdlInterface_corbatext_t : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbatext_t,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbatext_t::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbatext_t::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbatext_t::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbatext_t::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbatext_t->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbatext_t::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbatext_t->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbatext_t;
+
+class _Marshaller__seq_gsdlInterface_corbaFilterOption : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbaFilterOption,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbaFilterOption::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaFilterOption::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaFilterOption::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbaFilterOption::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbaFilterOption->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbaFilterOption::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbaFilterOption->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaFilterOption;
+
+class _Marshaller__seq_gsdlInterface_corbaOptionValue : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbaOptionValue,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbaOptionValue::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaOptionValue::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaOptionValue::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbaOptionValue::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbaOptionValue->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbaOptionValue::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbaOptionValue->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaOptionValue;
+
+class _Marshaller__seq_gsdlInterface_corbaTermInfo : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbaTermInfo,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbaTermInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaTermInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaTermInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbaTermInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbaTermInfo->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbaTermInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbaTermInfo->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaTermInfo;
+
+class _Marshaller__seq_gsdlInterface_corbaMetadataInfo : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbaMetadataInfo,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbaMetadataInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaMetadataInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaMetadataInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbaMetadataInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbaMetadataInfo->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbaMetadataInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbaMetadataInfo->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaMetadataInfo;
+
+class _Marshaller__seq_gsdlInterface_corbaResultDocInfo : public CORBA::StaticTypeInfo {
+    typedef SequenceTmpl<gsdlInterface::corbaResultDocInfo,MICO_TID_DEF> _MICO_T;
+  public:
+    StaticValueType create () const;
+    void assign (StaticValueType dst, const StaticValueType src) const;
+    void free (StaticValueType) const;
+    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
+    void marshal (CORBA::DataEncoder &, StaticValueType) const;
+};
+
+
+CORBA::StaticValueType _Marshaller__seq_gsdlInterface_corbaResultDocInfo::create() const
+{
+  return (StaticValueType) new _MICO_T;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaResultDocInfo::assign( StaticValueType d, const StaticValueType s ) const
+{
+  *(_MICO_T*) d = *(_MICO_T*) s;
+}
+
+void _Marshaller__seq_gsdlInterface_corbaResultDocInfo::free( StaticValueType v ) const
+{
+  delete (_MICO_T*) v;
+}
+
+CORBA::Boolean _Marshaller__seq_gsdlInterface_corbaResultDocInfo::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
+{
+  CORBA::ULong len;
+  if( !dc.seq_begin( len ) )
+    return FALSE;
+  ((_MICO_T *) v)->length( len );
+  for( CORBA::ULong i = 0; i < len; i++ ) {
+    if( !_marshaller_gsdlInterface_corbaResultDocInfo->demarshal( dc, &(*(_MICO_T*)v)[i] ) )
+      return FALSE;
+  }
+  return dc.seq_end();
+}
+
+void _Marshaller__seq_gsdlInterface_corbaResultDocInfo::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
+{
+  CORBA::ULong len = ((_MICO_T *) v)->length();
+  ec.seq_begin( len );
+  for( CORBA::ULong i = 0; i < len; i++ )
+    _marshaller_gsdlInterface_corbaResultDocInfo->marshal( ec, &(*(_MICO_T*)v)[i] );
+  ec.seq_end();
+}
+
+CORBA::StaticTypeInfo *_marshaller__seq_gsdlInterface_corbaResultDocInfo;
+
+struct __tc_init_CORBAIFACE {
+  __tc_init_CORBAIFACE()
+  {
+    _marshaller_gsdlInterface_corbatext_t = new _Marshaller_gsdlInterface_corbatext_t;
+    _marshaller_gsdlInterface_corbatext_tmap = new _Marshaller_gsdlInterface_corbatext_tmap;
+    _marshaller_gsdlInterface_corbaComError = new _Marshaller_gsdlInterface_corbaComError;
+    _marshaller_gsdlInterface_corbaShortColInfo = new _Marshaller_gsdlInterface_corbaShortColInfo;
+    _marshaller_gsdlInterface_corbaColInfoResponse = new _Marshaller_gsdlInterface_corbaColInfoResponse;
+    _marshaller_gsdlInterface_corbaDocRequest = new _Marshaller_gsdlInterface_corbaDocRequest;
+    _marshaller_gsdlInterface_corbaDocResponse = new _Marshaller_gsdlInterface_corbaDocResponse;
+    _marshaller_gsdlInterface_corbaFilterType = new _Marshaller_gsdlInterface_corbaFilterType;
+    _marshaller_gsdlInterface_corbaFilterRepeatable = new _Marshaller_gsdlInterface_corbaFilterRepeatable;
+    _marshaller_gsdlInterface_corbaFilterOption = new _Marshaller_gsdlInterface_corbaFilterOption;
+    _marshaller_gsdlInterface_corbaFilterOptionsResponse = new _Marshaller_gsdlInterface_corbaFilterOptionsResponse;
+    _marshaller_gsdlInterface_corbaOptionValue = new _Marshaller_gsdlInterface_corbaOptionValue;
+    _marshaller_gsdlInterface_corbaFilterRequest = new _Marshaller_gsdlInterface_corbaFilterRequest;
+    _marshaller_gsdlInterface_corbaTermInfo = new _Marshaller_gsdlInterface_corbaTermInfo;
+    _marshaller_gsdlInterface_corbaMetadataInfo = new _Marshaller_gsdlInterface_corbaMetadataInfo;
+    _marshaller_gsdlInterface_corbaMetadataInfo_map = new _Marshaller_gsdlInterface_corbaMetadataInfo_map;
+    _marshaller_gsdlInterface_corbaResultDocInfo = new _Marshaller_gsdlInterface_corbaResultDocInfo;
+    _marshaller_gsdlInterface_corbaIsApprox = new _Marshaller_gsdlInterface_corbaIsApprox;
+    _marshaller_gsdlInterface_corbaFilterResponse = new _Marshaller_gsdlInterface_corbaFilterResponse;
+    _marshaller_gsdlInterface_corbaiface = new _Marshaller_gsdlInterface_corbaiface;
+    _marshaller__seq_gsdlInterface_corbatext_t = new _Marshaller__seq_gsdlInterface_corbatext_t;
+    _marshaller__seq_gsdlInterface_corbaFilterOption = new _Marshaller__seq_gsdlInterface_corbaFilterOption;
+    _marshaller__seq_gsdlInterface_corbaOptionValue = new _Marshaller__seq_gsdlInterface_corbaOptionValue;
+    _marshaller__seq_gsdlInterface_corbaTermInfo = new _Marshaller__seq_gsdlInterface_corbaTermInfo;
+    _marshaller__seq_gsdlInterface_corbaMetadataInfo = new _Marshaller__seq_gsdlInterface_corbaMetadataInfo;
+    _marshaller__seq_gsdlInterface_corbaResultDocInfo = new _Marshaller__seq_gsdlInterface_corbaResultDocInfo;
+  }
+};
+
+static __tc_init_CORBAIFACE __init_CORBAIFACE;
+
Index: /gsdl/trunk/gs2runtime/src/corba/corbaiface_skel.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaiface_skel.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaiface_skel.mpp	(revision 16562)
@@ -0,0 +1,274 @@
+/*
+ *  MICO --- a free CORBA implementation
+ *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
+ *
+ *  This file was automatically generated. DO NOT EDIT!
+ */
+#include "corbaiface.h"
+
+//--------------------------------------------------------
+//  Implementation of skeletons
+//--------------------------------------------------------
+
+gsdlInterface::corbaiface_skel::corbaiface_skel( const CORBA::BOA::ReferenceData &_id )
+{
+  CORBA::ImplementationDef_var _impl =
+    _find_impl( "IDL:gsdlInterface/corbaiface:1.0", "corbaiface" );
+  assert( !CORBA::is_nil( _impl ) );
+  _create_ref( _id,
+    0,
+    _impl,
+    "IDL:gsdlInterface/corbaiface:1.0" );
+  register_dispatcher( new StaticInterfaceDispatcherWrapper<corbaiface_skel>( this ) );
+}
+
+gsdlInterface::corbaiface_skel::corbaiface_skel( CORBA::Object_ptr _obj )
+{
+  CORBA::ImplementationDef_var _impl =
+    _find_impl( "IDL:gsdlInterface/corbaiface:1.0", "corbaiface" );
+  assert( !CORBA::is_nil( _impl ) );
+  _restore_ref( _obj,
+    CORBA::BOA::ReferenceData(),
+    0,
+    _impl );
+  register_dispatcher( new StaticInterfaceDispatcherWrapper<corbaiface_skel>( this ) );
+}
+
+gsdlInterface::corbaiface_skel::~corbaiface_skel()
+{
+}
+
+bool gsdlInterface::corbaiface_skel::dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment & /*_env*/ )
+{
+  #ifdef HAVE_EXCEPTIONS
+  try {
+  #endif
+    switch (mico_string_hash (_req->op_name(), 17)) {
+    case 0:
+      if( strcmp( _req->op_name(), "collectionList" ) == 0 ) {
+        corbatext_tarray collist;
+        CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_inout_arg( &_collist );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        collectionList( collist, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 3:
+      if( strcmp( _req->op_name(), "ping" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        CORBA::Boolean wasSuccess;
+        CORBA::StaticAny _wasSuccess( CORBA::_stc_boolean, &wasSuccess );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_inout_arg( &_wasSuccess );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        ping( collection, wasSuccess, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 7:
+      if( strcmp( _req->op_name(), "filter" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        corbaFilterRequest request;
+        CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaFilterRequest, &request );
+        corbaFilterResponse response;
+        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterResponse, &response );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_in_arg( &_request );
+        _req->add_inout_arg( &_response );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        filter( collection, request, response, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 9:
+      if( strcmp( _req->op_name(), "getFilterOptions" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        corbatext_t option;
+        CORBA::StaticAny _option( _marshaller_gsdlInterface_corbatext_t, &option );
+        corbaFilterOptionsResponse response;
+        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterOptionsResponse, &response );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_in_arg( &_option );
+        _req->add_inout_arg( &_response );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        getFilterOptions( collection, option, response, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 10:
+      if( strcmp( _req->op_name(), "getCollectInfo" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        corbaColInfoResponse response;
+        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaColInfoResponse, &response );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_inout_arg( &_response );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        getCollectInfo( collection, response, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 11:
+      if( strcmp( _req->op_name(), "initialise" ) == 0 ) {
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        CORBA::Boolean _res;
+        CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
+        _req->add_inout_arg( &_error );
+        _req->set_result( &__res );
+
+        if( !_req->read_args() )
+          return true;
+
+        _res = initialise( error );
+        _req->write_results();
+        return true;
+      }
+      if( strcmp( _req->op_name(), "getFilterInfo" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        corbatext_tarray filterNames;
+        CORBA::StaticAny _filterNames( _marshaller__seq_gsdlInterface_corbatext_t, &filterNames );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_inout_arg( &_filterNames );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        getFilterInfo( collection, filterNames, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 12:
+      if( strcmp( _req->op_name(), "hasCollection" ) == 0 ) {
+        corbatext_t corbaCollection;
+        CORBA::StaticAny _corbaCollection( _marshaller_gsdlInterface_corbatext_t, &corbaCollection );
+        CORBA::Boolean has;
+        CORBA::StaticAny _has( CORBA::_stc_boolean, &has );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_corbaCollection );
+        _req->add_inout_arg( &_has );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        hasCollection( corbaCollection, has, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    case 13:
+      if( strcmp( _req->op_name(), "configure" ) == 0 ) {
+        corbatext_t key;
+        CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key );
+        corbatext_tarray cfgline;
+        CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_key );
+        _req->add_in_arg( &_cfgline );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        configure( key, cfgline, error );
+        _req->write_results();
+        return true;
+      }
+      if( strcmp( _req->op_name(), "getDocument" ) == 0 ) {
+        corbatext_t collection;
+        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
+        corbaDocRequest request;
+        CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaDocRequest, &request );
+        corbaDocResponse response;
+        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaDocResponse, &response );
+        corbaComError error;
+        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
+
+        _req->add_in_arg( &_collection );
+        _req->add_inout_arg( &_request );
+        _req->add_inout_arg( &_response );
+        _req->add_inout_arg( &_error );
+
+        if( !_req->read_args() )
+          return true;
+
+        getDocument( collection, request, response, error );
+        _req->write_results();
+        return true;
+      }
+      break;
+    }
+  #ifdef HAVE_EXCEPTIONS
+  } catch( CORBA::SystemException_catch &_ex ) {
+    _req->set_exception( _ex->_clone() );
+    _req->write_results();
+    return true;
+  } catch( ... ) {
+    assert( 0 );
+    return true;
+  }
+  #endif
+  return false;
+}
+
+gsdlInterface::corbaiface_ptr gsdlInterface::corbaiface_skel::_this()
+{
+  return gsdlInterface::corbaiface::_duplicate( this );
+}
+
Index: /gsdl/trunk/gs2runtime/src/corba/corbaproto.h
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaproto.h	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaproto.h	(revision 16562)
@@ -0,0 +1,101 @@
+/**********************************************************************
+ *
+ * corbaproto.h -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+
+#ifndef CORBAPROTO_H
+#define CORBAPROTO_H
+
+#include "gsdlconf.h"
+#include "collectserver.h"
+#include "recptproto.h"
+#include "corbaiface.h"
+using namespace gsdlInterface;
+
+class corbaproto : public recptproto {
+ private:
+  corbaiface_var getCorbaClient();
+ protected:
+  collectservermapclass cservers;
+  corbaiface_var        client;
+  CORBA::ORB_var        orb;
+  CORBA::BOA_var        boa;
+  CORBA::Object_var     obj;
+  text_t gsdlhome;
+  text_t site_name;
+
+ public:
+  virtual ~corbaproto() {}
+  corbaproto(char* site_name);
+
+  // add_collectserver should be called for each collection server
+  // before any configuration is done
+  void add_collectserver (collectserver *thecserver) 
+    {cservers.addcollectserver(thecserver);}
+
+  // this configure will configure each of the collection servers
+  void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err);
+
+  // this init will init each of the collection servers
+  bool init (comerror_t &err,ostream &logout);
+
+  // used to check for icons and retrieve them from the collection
+  // site if they are missing
+  void  cache_missing_icons(text_tmap& format_map,
+			    text_t& httpdomain, 
+			    text_t& httpprefix);
+
+  text_t get_site_name (comerror_t &err);
+
+  text_t get_protocol_name (comerror_t &err);
+  void get_collection_list (text_tarray &collist, comerror_t &err, 
+			    ostream &logout);
+  void has_collection (const text_t &collection, bool &hascollection, 
+		       comerror_t &err, ostream &logout);
+  void ping (const text_t &collection, bool &wassuccess, 
+	     comerror_t &err, ostream &logout);
+  void get_collectinfo (const text_t &collection, 
+			ColInfoResponse_t &collectinfo,
+			comerror_t &err, ostream &logout);
+  void get_filterinfo (const text_t &collection,
+		       InfoFiltersResponse_t &response,
+		       comerror_t &err, ostream &logout);
+  void get_filteroptions (const text_t &collection,
+			  const InfoFilterOptionsRequest_t &request,
+			  InfoFilterOptionsResponse_t &response, 
+			  comerror_t &err, ostream &logout);
+  void filter (const text_t &collection,
+	       FilterRequest_t &request,
+	       FilterResponse_t &response,
+	       comerror_t &err, ostream &logout);
+
+  void get_document (const text_t &collection,
+		     const DocumentRequest_t &request,
+		     DocumentResponse_t &response,
+		     comerror_t &err, ostream &logout);
+
+};
+
+
+#endif
Index: /gsdl/trunk/gs2runtime/src/corba/corbaproto.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbaproto.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbaproto.mpp	(revision 16562)
@@ -0,0 +1,750 @@
+/**********************************************************************
+ *
+ * corbaproto.cpp -- 
+ * Copyright (C) 2000 The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ *
+ *********************************************************************/
+
+#include <iostream.h>
+#include <fstream.h>
+
+#include "fileutil.h"
+
+// protocol headers for CORBA
+#include "corbaiface.h"
+using namespace gsdlInterface;
+
+// greenstone library headers
+#include "corbaconv_text_t.h"
+
+// greenstone local headers
+#include "corbatext_t.h"
+
+#include "corbaproto.h"
+#include "colservrconfig.h"
+
+// default headers
+#include <assert.h>
+
+void corbatext_optionValueArrayToCorba(OptionValue_tarray array, corbaOptionValue_array &corba)
+{
+  unsigned int i = 0;
+  OptionValue_tarray::iterator here = array.begin();
+  OptionValue_tarray::iterator end = array.end();
+  
+  while (here != end)
+    {
+      corba.length(i+1);
+      
+      corbaconv_text_t::getCorbatext(here->name,corba[i].name);
+      corbaconv_text_t::getCorbatext(here->value,corba[i].value);
+
+      i ++;
+      here ++;
+    }
+  //  cout << "Options " << i << endl;
+}
+
+void corbaresponse_resultMetadataToCorba(MetadataInfo_t &meta, corbaMetadataInfo &corbaMeta)
+{
+  corbaconv_text_t::getCorbatext(meta.params,corbaMeta.params);
+  corbatext_arrayToCorbaArray(meta.values, &corbaMeta.values);
+  corbaMeta.isRef    = meta.isRef;
+}
+
+void corbaresponse_resultMetadataToC(const corbaMetadataInfo &corbaMeta, MetadataInfo_t &meta)
+{
+  corbaconv_text_t::setCorbatext(meta.params,corbaMeta.params);
+  corbatext_corbaArrayToArray(corbaMeta.values, &meta.values);
+  meta.isRef    = corbaMeta.isRef;
+}
+
+int corbaresponse_resultMetaParentToCorba(MetadataInfo_t *parent, corbaMetadataInfo_array &corbaparent)
+{
+  int reply = -1, pid = -1;
+
+  // extend for new parent
+  reply = corbaparent.length();
+  corbaparent.length(reply+1);
+
+  // copy content into new array element
+  corbaresponse_resultMetadataToCorba(*parent, corbaparent[reply]);
+
+  // deal with our own parent
+  if (parent->parent != NULL)
+    {
+      // get offset of new parent and extend parent vector
+
+      pid  = corbaresponse_resultMetaParentToCorba(parent->parent, corbaparent);
+    }
+  corbaparent[reply].parentid = pid;
+
+  // return the parent id from here
+  return reply;
+}
+
+MetadataInfo_t *corbaresponse_resultMetaParentToC(corbaMetadataInfo_array &corbaparent, int pid)
+{
+  MetadataInfo_t *reply;
+
+  reply = new MetadataInfo_t;
+
+  corbaresponse_resultMetadataToC(corbaparent[pid], *reply);
+
+  // deal with our own parent
+  if (corbaparent[pid].parentid >= 0)
+    {
+      // get offset of new parent and extend parent vector
+
+      reply->parent = corbaresponse_resultMetaParentToC(corbaparent, corbaparent[pid].parentid);
+    }
+  else
+    {
+      reply->parent = NULL;
+    }
+
+  // return the parent id from here
+  return reply;
+}
+
+void corbaresponse_resultDocInfoToCorba(ResultDocInfo_tarray docinfo, corbaResultDocInfo_array &corbainfo)
+{
+  ResultDocInfo_tarray::iterator here = docinfo.begin();
+  ResultDocInfo_tarray::iterator end  = docinfo.end();
+  unsigned int i;
+
+  i = 0;
+  while (here != end)
+    {
+      corbainfo.length(i+1);
+
+      // copy the easy bits
+      corbaconv_text_t::getCorbatext(here->OID,corbainfo[i].OID);
+
+      corbainfo[i].resultNum     = here->result_num;
+      corbainfo[i].ranking       = here->ranking;
+      corbainfo[i].termsMatched  = here->num_terms_matched;
+      corbainfo[i].phraseMatched = here->num_phrase_match;
+
+      // copy the docFreq array
+      vector<int>::iterator fhere = here->docFreq.begin();
+      vector<int>::iterator fend  = here->docFreq.end();
+      unsigned int          fi = 0;
+
+      while (fhere != fend)
+	{
+	  corbainfo[i].docFreq.length(fi+1);
+
+	  corbainfo[i].docFreq[fi] = *fhere;
+
+	  fhere ++;
+	  fi ++;
+	}
+
+      // copy the MetadataInfo map
+      MetadataInfo_tmap::iterator mhere = here->metadata.begin();
+      MetadataInfo_tmap::iterator mend  = here->metadata.end();
+      unsigned int mi = 0;
+
+      while (mhere != mend)
+	{
+	  corbainfo[i].metadata.names.length(mi+1);
+	  corbainfo[i].metadata.values.length(mi+1);
+	  
+	  // copy name
+	  corbaconv_text_t::getCorbatext((*mhere).first,corbainfo[i].metadata.names[mi]);
+
+	  // copy metadata
+	  corbaresponse_resultMetadataToCorba((*mhere).second, corbainfo[i].metadata.values[mi]);
+	  if (mhere->second.parent != NULL)
+	    {
+	      int pid;
+
+	      pid = corbaresponse_resultMetaParentToCorba(mhere->second.parent, 
+							      corbainfo[i].metaparents);
+	      corbainfo[i].metadata.values[mi].parentid = pid;
+	    }
+	  else
+	    {
+	      corbainfo[i].metadata.values[mi].parentid = -1;
+	    }
+
+	  cout << "Parent " << mi << " " << (int) &mhere->second << " " << (int) mhere->second.parent << endl;
+
+	  mhere ++;
+	  mi ++;
+	}
+
+      // Copy the classifier variables
+      corbaconv_text_t::getCorbatext(here->classifier_metadata_type, corbainfo[i].classifierMetadataType);
+      corbainfo[i].classifierMetadataOffset = here->classifier_metadata_offset;
+
+      // Get next Docinfo item
+      i++;
+      here ++;
+    }
+}
+
+void corbaresponse_resultDocInfoToC(corbaResultDocInfo_array corbainfo, ResultDocInfo_tarray &docinfo)
+{
+  unsigned int i;
+  ResultDocInfo_t doc;
+
+  for (i = 0; i < corbainfo.length(); i++)
+    {
+      corbaconv_text_t::setCorbatext(doc.OID,corbainfo[i].OID);
+      doc.result_num        = corbainfo[i].resultNum;
+      doc.ranking           = corbainfo[i].ranking;
+      doc.num_terms_matched = corbainfo[i].termsMatched;
+      doc.num_phrase_match  = corbainfo[i].phraseMatched;
+
+      // copy the doc freq array
+      unsigned int fi;
+      for (fi = 0; fi < corbainfo[i].docFreq.length(); fi ++)
+	{
+	  doc.docFreq.push_back(corbainfo[i].docFreq[fi]);
+	}
+
+      // copy the MetadataInfomap
+      unsigned int   mi;
+      text_t         mname;
+      MetadataInfo_t mdata;
+      
+      doc.metadata.clear();
+      for (mi = 0; mi < corbainfo[i].metadata.names.length(); mi ++)
+	{
+	  // get name
+	  corbaconv_text_t::setCorbatext(mname,corbainfo[i].metadata.names[mi]);
+
+	  // get metadata
+	  corbaresponse_resultMetadataToC(corbainfo[i].metadata.values[mi], mdata);
+
+	  if (corbainfo[i].metadata.values[mi].parentid >= 0)
+	    {
+	      mdata.parent = 
+		corbaresponse_resultMetaParentToC(corbainfo[i].metaparents, 
+						  corbainfo[i].metadata.values[mi].parentid);	      
+	    }
+	 
+	  doc.metadata.insert(make_pair(mname, mdata));
+	}
+
+      // GRB: sort out parent data
+      for (mi = 0; mi < corbainfo[i].metadata.names.length(); mi ++)
+	{
+	  if (corbainfo[i].metadata.values[mi].parentid != 0)
+	    { 
+	      int pi;
+
+	      for (pi = 0; pi < corbainfo[i].metadata.names.length(); pi ++)
+		{
+		  if (pi != mi &&
+		      corbainfo[i].metadata.values[mi].parentid ==
+		      corbainfo[i].metadata.values[pi].id)
+		    {
+		      doc.metadata[mi].parent = &doc.metadata[pi];
+		    }
+		}
+	    }
+	}
+      //      doc.metadata
+
+      // convert metadata classifer information
+      corbaconv_text_t::setCorbatext(doc.classifier_metadata_type,corbainfo[i].classifierMetadataType);
+      doc.classifier_metadata_offset = corbainfo[i].classifierMetadataOffset;
+
+      docinfo.push_back(doc); 
+    }
+}
+
+
+// Added 31/1/2001, Michael Dewsnip
+void corbaresponse_resultTermInfoToC(corbaTermInfo_array corbainfo, TermInfo_tarray &terminfo)
+{
+  TermInfo_t ti;
+
+  for (unsigned int i = 0; i < corbainfo.length(); i++) {
+    corbaconv_text_t::setCorbatext(ti.term, corbainfo[i].term);
+    ti.freq = corbainfo[i].frequency;
+
+    for (unsigned int j = 0; j < corbainfo[i].matchTerms.length(); j++) {
+      text_t mt;
+      corbaconv_text_t::setCorbatext(mt, corbainfo[i].matchTerms[j]);
+
+      ti.matchTerms.push_back(mt);
+    }
+
+    terminfo.push_back(ti);
+  }
+}
+
+
+corbaproto::corbaproto(char* _site_name)
+{ char *dummyv[1] = {""};
+  int   dummyc = 0;
+  // CORBA variables
+  /* static CORBA::ORB_var orb = CORBA::ORB_init( dummyc , dummyv, "mico-local-orb" );
+     static CORBA::BOA_var boa = orb->BOA_init( dummyc , dummyv, "mico-local-boa" ); */
+
+  CORBA::ORB_var orb = CORBA::ORB_init( dummyc , dummyv, "mico-local-orb" );
+  CORBA::BOA_var boa = orb->BOA_init( dummyc , dummyv, "mico-local-boa" );
+
+  char objid_filename[256];
+  sprintf(objid_filename,"/tmp/%s.objid",_site_name);
+
+  // Get ref from "naming service"
+  ifstream in (objid_filename);
+  char ref[1000];
+  in >> ref;
+  in.close ();
+
+  // startup corba
+  // static CORBA::Object_var obj = orb->string_to_object (ref);
+  CORBA::Object_var obj = orb->string_to_object (ref);
+
+  client = corbaiface::_narrow( obj ); 
+  // client = NULL; // ****
+
+  gsdlhome.clear();
+  site_name = _site_name;
+}
+
+corbaiface_var corbaproto::getCorbaClient()
+{
+  // This function was written to help corba when ORB and BOA were
+  // not working in "persistent" mode.
+  // Now that persistent mode is working it is not longer needed/used.
+
+  char *dummyv[1] = {""};
+  int   dummyc = 0;
+  // CORBA variables
+//  static CORBA::ORB_var orb = CORBA::ORB_init( dummyc , dummyv, "mico-local-orb" );
+//  static CORBA::BOA_var boa = orb->BOA_init( dummyc , dummyv, "mico-local-boa" );
+
+  // DB // Try this out!! // ****
+  CORBA::ORB_var orb = CORBA::ORB_init( dummyc , dummyv, "mico-local-orb" );
+  CORBA::BOA_var boa = orb->BOA_init( dummyc , dummyv, "mico-local-boa" );
+
+  /*  char* site_name_chars = site_name.getcstr();
+  char objid_filename[256];
+  sprintf(objid_filename,"/tmp/%s.objid",site_name_chars);
+  // delete site_name_chars; */
+
+  text_t objid_filename = "/tmp/" + site_name + ".objid";
+
+  // Get ref from "naming service"
+  ifstream in (objid_filename.getcstr());
+  char ref[1000];
+  in >> ref;
+  in.close ();
+
+  // startup corba
+  // DB // Try this out!! // ****
+  // static CORBA::Object_var obj = orb->string_to_object (ref);
+  CORBA::Object_var obj = orb->string_to_object (ref);
+
+  return corbaiface::_narrow( obj );
+}
+
+
+// this configure will configure each of the collection servers
+void corbaproto::configure (const text_t &key, const text_tarray &cfgline,
+			    comerror_t &err) {
+  // the naming of the collection should not be done here,
+  // it should be done just after the collection server has been 
+  // created
+
+  // cout << "Corbaproto::Configure" << endl;
+  corbatext_t      corbaKey;
+  corbatext_tarray corbaCfgline;
+  gsdlInterface::corbaComError error = corbaNoError;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(key,corbaKey);
+  corbatext_arrayToCorbaArray(cfgline, &corbaCfgline);
+
+  // execute the corba transaction
+  lclient->configure(corbaKey, corbaCfgline, error);    
+
+  if (key=="gsdlhome")
+    {
+      // store gsdlhome in corba prototype so it can be used later to
+      // check if icons specified in format statements exist on the
+      // recptionist's side
+      gsdlhome = cfgline[0];
+    }
+  err = (comerror_t) error;
+}
+
+// this init will configure and init each of the collection servers
+bool corbaproto::init (comerror_t &err, ostream &logout) {
+//  cout << "Corbaproto::Init" << endl;
+  gsdlInterface::corbaComError error = corbaNoError;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // execute the corba transaction
+  return lclient->initialise(error);
+}
+
+void  corbaproto::cache_missing_icons(text_tmap& format_map,
+				      text_t& httpdomain, 
+				      text_t& httpprefix)
+{
+  // consider making this a member function in the object?
+
+  text_tmap::iterator format_here = format_map.begin();
+  text_tmap::iterator format_end = format_map.end();
+  while (format_here!=format_end)
+    {
+      text_t format_line = format_here->second;
+
+      // cout << "*** format line = " << format_line << endl; // ****
+
+      text_t::iterator fl_begin = format_line.begin();
+      text_t::iterator fl_end = format_line.end();
+
+      text_t::iterator httpimg_find = findword(fl_begin,fl_end,"_httpimg_");
+      text_t::iterator http_find = httpimg_find;
+
+      while (httpimg_find!=fl_end)
+	{
+	  http_find = httpimg_find+5;
+	  httpimg_find += 9;
+
+	  // look for white space " or >
+	  text_t::iterator filename_end = httpimg_find;
+	  while (filename_end != fl_end)
+	    {
+	      if (*filename_end == ' ') break;
+	      if (*filename_end == '\t') break;
+	      if (*filename_end == '\"') break;
+	      if (*filename_end == '>') break;
+	      filename_end++;
+	    }
+
+	  text_t img_filename = substr(httpimg_find,filename_end);
+
+	  text_t site_img_filename = filename_cat(gsdlhome,"images",img_filename);
+
+	  // look to see if img filename exists in images directory
+	  if (!file_exists(site_img_filename))
+	    {
+	      text_t cache_img_dir
+		= filename_cat(gsdlhome,"images",".cache");
+
+	      text_t remote_img_url = "http://" + httpdomain + httpprefix
+		+ "/images" + img_filename;
+
+	      text_t wget_cmd = "wget -q -N --directory-prefix="+cache_img_dir
+		+ " " + remote_img_url;
+
+	      char* wget_cmd_chars = wget_cmd.getcstr();
+
+	      system(wget_cmd_chars);
+	      delete wget_cmd_chars;
+
+	      format_map[format_here->first] 
+		= substr(fl_begin,http_find) + "cache" + substr(http_find,fl_end);
+
+	    }
+
+	  httpimg_find = findword(httpimg_find,fl_end,"_httpimg_");
+	}
+      format_here++;
+    }
+}
+
+text_t corbaproto::get_site_name (comerror_t &err) {
+  return site_name;
+}
+
+text_t corbaproto::get_protocol_name (comerror_t &err) {
+  return "corbaproto";
+}
+
+
+void corbaproto::get_collection_list (text_tarray &collist, comerror_t &err, 
+				     ostream &/*logout*/) {
+
+  // cout << "Corbaproto::Collection list" << endl;
+
+  corbatext_tarray corba_collist;
+  text_tarray      tcollist;
+  gsdlInterface::corbaComError error = corbaNoError;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // execute the corba transaction
+  lclient->collectionList(corba_collist,error);
+
+  // convert the response back to normal form
+  corbatext_corbaArrayToArray(corba_collist, &tcollist);
+  collist = tcollist;
+
+  err = (comerror_t) error;
+}
+
+void corbaproto::has_collection (const text_t &collection, bool &hascollection, 
+				comerror_t &err, ostream &/*logout*/) {
+  // cout << "Corbaproto::Has collection" << endl;
+
+  corbatext_t     corbaCollection;
+  corbaComError corbaError = corbaNoError;
+  CORBA::Boolean corbaHas;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollection);
+  
+  // execute the corba transaction
+  lclient->hasCollection(corbaCollection, corbaHas, corbaError);
+
+  // convert the response back to normal form
+  hascollection = (corbaHas != 0);
+  err = noError;
+}
+
+void corbaproto::ping (const text_t &collection, bool &wassuccess, 
+		      comerror_t &err, ostream &/*logout*/) {
+  // cout << "Corbaproto::Ping" << endl;
+
+  corbatext_t corbaCollect;
+  corbaComError corbaError = corbaNoError;
+  CORBA::Boolean success;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollect);
+
+  // execute the corba transaction
+  lclient->ping(corbaCollect, success, corbaError);
+  
+  // convert the response back to normal form
+  wassuccess = (success != 0);
+  err = (comerror_t) corbaError;  
+  cout << "Corbaproto::Ping" << err << endl;
+}
+
+
+void corbaproto::get_collectinfo (const text_t &collection, 
+				 ColInfoResponse_t &collectinfo,
+				 comerror_t &err, ostream &logout) {
+  //  cout << "Corbaproto::Collectinfo" << endl;
+
+  corbatext_t          corbaCollection;
+  corbaComError        corbaError = corbaNoError;
+  corbaColInfoResponse corbaCollectInfo;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollection);
+
+  // execute the corba transaction
+  lclient->getCollectInfo(corbaCollection, corbaCollectInfo, corbaError);
+
+  // convert the response back to normal form
+  collectinfo.useBook = corbaCollectInfo.useBook;
+  collectinfo.isPublic = corbaCollectInfo.isPublic;
+  collectinfo.isBeta   = corbaCollectInfo.isBeta;
+  collectinfo.buildDate = corbaCollectInfo.buildDate;
+  corbatext_corbaArrayToArray(corbaCollectInfo.ccsCols, &collectinfo.ccsCols);
+  corbatext_corbaArrayToArray(corbaCollectInfo.languages, &collectinfo.languages);
+  collectinfo.numDocs   = corbaCollectInfo.numDocs;
+  collectinfo.numWords  = corbaCollectInfo.numWords;
+  collectinfo.numBytes  = corbaCollectInfo.numBytes;
+  corbatext_corbaMapToMap(corbaCollectInfo.collectionMeta, collectinfo.collectionmeta);
+  corbatext_corbaMapToMap(corbaCollectInfo.format, collectinfo.format);
+  corbatext_corbaMapToMap(corbaCollectInfo.building, collectinfo.building);
+  corbaconv_text_t::setCorbatext(collectinfo.httpdomain,corbaCollectInfo.httpdomain);
+  corbaconv_text_t::setCorbatext(collectinfo.httpprefix,corbaCollectInfo.httpprefix);
+  corbaconv_text_t::setCorbatext(collectinfo.receptionist,corbaCollectInfo.receptionist);
+
+  cache_missing_icons(collectinfo.format,collectinfo.httpdomain,
+		      collectinfo.httpprefix);
+
+  err = (comerror_t) corbaError;  
+}
+
+
+void corbaproto::get_filterinfo (const text_t &collection,
+				InfoFiltersResponse_t &response,
+				comerror_t &err, ostream &logout) {
+  //  cout << "Corbaproto::Filterinfo" << endl;
+
+  corbatext_t corbaCollection;
+  corbatext_tset corbaResponse;
+  corbaComError corbaError = corbaNoError;
+  
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollection);
+
+  // execute the corba transaction
+  lclient->getFilterInfo(corbaCollection, corbaResponse, corbaError);
+
+  // convert the response back to normal form
+  corbatext_corbaArrayToSet(corbaResponse, &response.filterNames);
+
+  err = (comerror_t) corbaError;
+}
+
+void corbaproto::get_filteroptions (const text_t &collection,
+				   const InfoFilterOptionsRequest_t &request,
+				   InfoFilterOptionsResponse_t &response, 
+				   comerror_t &err, ostream &logout) {
+  //  cout << "Corbaproto::Filteroptions" << endl;
+
+  corbatext_t corbaCollection;
+  corbatext_t filterName;
+  corbaFilterOptionsResponse corbaResponse;
+  corbaComError corbaError = corbaNoError;
+  unsigned int i;
+  corbaconv_text_t *cc_name;
+  FilterOption_t *option;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollection);
+  corbaconv_text_t::getCorbatext(request.filterName,filterName);
+
+  // execute the corba transaction
+  lclient->getFilterOptions(corbaCollection, filterName, corbaResponse, corbaError);
+
+  // convert the response back to normal form
+  for (i = 0; i < corbaResponse.names.length(); i ++)
+    {
+      cc_name = new corbaconv_text_t(corbaResponse.names[i]);
+
+      option = new FilterOption_t;
+      corbaconv_text_t::setCorbatext(option->name,corbaResponse.options[i].name);
+      option->type = (FilterOption_t::type_t) corbaResponse.options[i].type;
+      option->repeatable = (FilterOption_t::repeatable_t) corbaResponse.options[i].repeatable;
+      corbaconv_text_t::setCorbatext(option->defaultValue,corbaResponse.options[i].defaultValue);
+      corbatext_corbaArrayToArray(corbaResponse.options[i].validValues, &option->validValues);
+
+      response.filterOptions.insert(make_pair(*cc_name, *option)); // typecast to text_t
+    }
+
+  err =  (comerror_t) corbaError;
+}
+
+
+void corbaproto::filter (const text_t &collection,
+			  FilterRequest_t &request,
+			  FilterResponse_t &response,
+			  comerror_t &err, ostream &logout) {
+  //  cout << "Corbaproto::Filter" << endl;
+
+  corbaFilterRequest corbaRequest;
+  corbaFilterResponse corbaResponse;
+  corbatext_t     corbaCollection;
+  corbaComError corbaError = corbaNoError;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollection);
+  corbaconv_text_t::getCorbatext(request.filterName,corbaRequest.filter);
+  corbatext_optionValueArrayToCorba(request.filterOptions, corbaRequest.filterOptions);
+  corbatext_arrayToCorbaArray(request.docSet, &corbaRequest.docSet);
+  corbaRequest.filterResultOptions = request.filterResultOptions;
+  corbaconv_text_t::getCorbatext(request.requestParams,corbaRequest.requestParams);
+  corbaconv_text_t::getCorbatext(request.refParams,corbaRequest.refParams);
+  corbaRequest.getParents = request.getParents;
+  corbatext_setToCorbaArray(request.fields, &corbaRequest.fields);
+
+  corbaResponse.numDocs = response.numDocs;
+  corbaresponse_resultDocInfoToCorba(response.docInfo, corbaResponse.docInfo);
+
+  // execute the corba transaction
+  lclient->filter (corbaCollection, corbaRequest, corbaResponse, corbaError);
+
+  // convert the response back to normal form
+  response.numDocs = corbaResponse.numDocs;
+  response.isApprox = (enum isapprox) corbaResponse.isApprox;
+  corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo);
+
+  // Added 31/1/2001, Michael Dewsnip
+  corbaresponse_resultTermInfoToC(corbaResponse.termInfo, response.termInfo);
+
+  err = (comerror_t) corbaError;
+  //  cout << "Corbaproto::Filter" << endl;
+}
+
+
+void corbaproto::get_document (const text_t &collection,
+			       const DocumentRequest_t &request,
+			       DocumentResponse_t &response,
+			       comerror_t &err, ostream &logout) {
+  //  cout << "Corbaproto::Get Document" << endl;
+
+  corbatext_t      corbaCollect;
+  corbaDocRequest  corbaRequest;
+  corbaDocResponse corbaResponse;
+  corbaComError    corbaError = corbaNoError;
+
+  // get the corba client reference
+  // corbaiface_var lclient = this->getCorbaClient(); // ****
+  corbaiface_var lclient = client;
+
+  // convert all the requisite structures into their CORBA form
+  corbaconv_text_t::getCorbatext(collection,corbaCollect);
+  corbaconv_text_t::getCorbatext(request.OID,corbaRequest.OID);
+  corbaconv_text_t::getCorbatext(request.docType,corbaRequest.docType);
+  corbaconv_text_t::getCorbatext(request.docFormat,corbaRequest.docFormat);
+
+  // execute the corba transaction
+  lclient->getDocument(corbaCollect, corbaRequest, corbaResponse, corbaError);
+
+  // convert the response back to normal form
+  corbaconv_text_t::setCorbatext(response.doc,corbaResponse.doc);
+
+  err = (comerror_t) corbaError;
+}
+
Index: /gsdl/trunk/gs2runtime/src/corba/corbatext_t.h
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbatext_t.h	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbatext_t.h	(revision 16562)
@@ -0,0 +1,13 @@
+void corbatext_fillChar(corbatext_t *t, char *text);
+void corbatext_usvector(corbatext_t t, vector<unsigned short>& us);
+char *corbatext_string(corbatext_t t);
+#ifdef TEXT_T_H
+void corbatext_arrayToCorbaArray(text_tarray t, corbatext_tarray *ca);
+void corbatext_corbaArrayToArray(corbatext_tarray ca, text_tarray *ta);
+void corbatext_mapToCorbaMap(text_tmap tm, corbatext_tmap *cm);
+void corbatext_corbaMapToMap(corbatext_tmap cm, text_tmap &tm);
+void corbatext_setToCorbaArray(text_tset set, corbatext_tset *cset);
+void corbatext_corbaArrayToSet(corbatext_tset cset, text_tset *set);
+corbatext_t_var corbatext_corbatext(text_t t);
+int corbatext_corbatext(text_t t, corbatext_t_var ct);
+#endif
Index: /gsdl/trunk/gs2runtime/src/corba/corbatext_t.mpp
===================================================================
--- /gsdl/trunk/gs2runtime/src/corba/corbatext_t.mpp	(revision 16562)
+++ /gsdl/trunk/gs2runtime/src/corba/corbatext_t.mpp	(revision 16562)
@@ -0,0 +1,179 @@
+// standard headers
+#if defined(GSDL_USE_STL_H)
+#include <iostream.h>
+#include <fstream.h>
+#include <vector.h>
+#else
+#include <iostream>
+#include <fstream>
+#include <vector>
+#endif
+
+// protocol headers
+#include "corbaiface.h"
+using namespace gsdlInterface;
+
+// greenstone headers
+#include "corbaconv_text_t.h"
+
+//local headers
+#include "corbatext_t.h"
+
+void corbatext_fillChar(corbatext_t *t, char *text)
+{
+  unsigned int i;
+
+  t->text.length(0);
+  if (text == NULL)
+      {
+	  return;
+      }
+  for (i = 0; i < strlen(text); i ++)
+      {
+	  t->text[i] = text[i];
+      }  
+  t->encoding = 0;
+}
+
+void corbatext_usvector(corbatext_t t, usvector& us)
+{
+  unsigned int i;
+
+  for (i = 0; i < t.text.length(); i ++)
+    {
+      us.push_back(t.text[i]);
+    }
+}
+
+char *corbatext_string(corbatext_t t)
+{ 
+  char *lcopy;
+  unsigned int i;
+    lcopy = (char *) malloc(t.text.length() + 1);
+    for (i = 0; i < t.text.length(); i ++)
+    {
+      lcopy[i] = (char) t.text[i];
+    }
+    lcopy[i] = '\0';
+    return lcopy;
+}
+
+corbatext_t_var corbatext_corbatext(text_t t)
+{ corbatext_t_var ct;
+// usString_var    us;
+
+  // cout << "Making text\n";
+  ct = new corbatext_t;
+  //  ct->text.length(20);
+  // us = new usString(20);
+  //  cout << ct->text.length() << endl;
+  //  cout << ct->text.maximum() << endl;
+  corbaconv_text_t::fillUsString(t,&ct->text);
+  //t.fillUsString(us);
+  // delete us;
+  // cout << "Encoding text\n";
+  ct->encoding = 0;
+  // cout << "Encoding text\n";
+  return ct;
+}
+
+int corbatext_corbatext(text_t t, corbatext_t_var ct)
+{
+  cout << "A" << endl;
+  corbaconv_text_t::fillUsString(t,&ct->text);
+  cout << "B" << endl;
+  ct->encoding = 0;
+  cout << "C" << endl;
+}
+
+void corbatext_corbaArrayToArray(corbatext_tarray ca, text_tarray *ta)
+{
+  unsigned int i;
+  corbaconv_text_t *cct;
+
+  ta->clear();
+  ta->reserve(ca.length());
+  for (i = 0; i < ca.length(); i ++)
+    {
+      cct = new corbaconv_text_t(ca[i]);
+      ta->push_back(*cct); // cast to text_t
+    }  
+}
+
+void corbatext_arrayToCorbaArray(text_tarray ta, corbatext_tarray *_ca)
+{
+  text_tarray::iterator here = ta.begin();
+  text_tarray::iterator end = ta.end();
+  corbatext_tarray ca(end - here);
+  unsigned int i;
+
+  i = 0;
+  (*_ca).length(end - here);
+
+  while (here != end)
+    {
+      corbatext_t_var ptr;
+      //      cout << "Array: " << (*_ca).maximum() << " " << (*_ca).length() << endl;
+      ptr = corbatext_corbatext(*here);
+      (*_ca)[i] = ptr;
+      here ++;
+      i++;      
+    }
+}
+
+void corbatext_corbaArrayToSet(corbatext_tarray t, text_tset *ts)
+{ unsigned int i;
+ 
+  for (i = 0; i < t.length(); i ++)
+    {
+      ts->insert((corbaconv_text_t) t[i]); // further typecast to text_t
+    } 
+
+  return;
+}
+
+void corbatext_setToCorbaArray(text_tset ts, corbatext_tarray *t)
+{
+  corbatext_t str;
+  text_tset::iterator here = ts.begin();
+  text_tset::iterator end = ts.end();
+  unsigned int i;
+
+  i = 0;
+  while (here != end)
+    {
+      (*t).length(i+1);
+      (*t)[i] = *corbatext_corbatext(*here);
+      here ++;
+      i ++;
+    }
+}
+
+void corbatext_mapToCorbaMap(text_tmap map, corbatext_tmap *cmap)
+{
+  text_tmap::iterator here = map.begin();
+  text_tmap::iterator end  = map.end();
+  unsigned int i = 0;
+
+  while (here != end)
+    {
+      (*cmap).names.length(i+1);
+      (*cmap).values.length(i+1);
+      cmap->names[i] = *corbatext_corbatext((*here).first);
+      cmap->values[i] = *corbatext_corbatext((*here).second);
+      here ++;
+      i ++;
+    }
+}
+
+void corbatext_corbaMapToMap(corbatext_tmap cmap, text_tmap &map)
+{
+  unsigned int i;
+
+  for (i = 0; i < cmap.names.length(); i ++)
+    {
+      map.insert(make_pair(*(new corbaconv_text_t(cmap.names[i])), 
+                           *(new corbaconv_text_t(cmap.values[i])))); // further typecast to text_t
+    }
+}
+
