[Net-z3950] SimpleServer srw diagnostics

Mike Taylor mike at indexdata.com
Tue Sep 11 15:34:30 CEST 2007


Phil Cross writes:
 > I'd like my simpleserver implementation to be able to issue a
 > diagnostic error code for SRU requests that request an invalid
 > schema. I think the correct diagnostic in the info:srw/diagnostic/1
 > namespace is: 66: 'Unknown schema for retrieval'. This is included
 > in the yaz header file: diagsrw.h

Correct.

 > However, I assume I can only include diagnostic codes from the
 > bib-1 set (in header file: diagbib1.h) in the simpleserver code and
 > I don't know what the equivalent diagnostic would be.

Also correct -- the YAZ GFS (Generic Frontend Server), and hence
SimpleServer which is a Perl layer over the GFS, deal in Z39.50 BIB-1
diagnostic codes whether the actual client is Z39.50 or SRU/W.  This
is because the same GFS-based server will in general need to be able
to handle both kinds of clients, and it simplifies matters to deal
with a single diagnostic set uniformly.

 > I take it there is some mapping going on between the two sets
 > somewhere, e.g. my error code 12, for 'Too many results in set', is
 > getting converted to info:srw/diagnostic/1/60, 'Result set not
 > created: too many matching records'.

Also correct.  This is done inside the GFS when it knows it's talking
to an SRU/W client.  The mapping is done using the function
yaz_diag_bib1_to_srw(), which you can read in the YAZ source at
	http://www.indexdata.dk/yaz/dox/html/srwutil_8c-source.html

As you can see, it uses a big static mapping called srw_bib1_map[],
which you are welcome to consult.  So far as I know, no mapping
between BIB-1 and SRU diagnostics has been published apart from this
code.

 _/|_	 ___________________________________________________________________
/o ) \/  Mike Taylor    <mike at indexdata.com>    http://www.miketaylor.org.uk
)_v__/\  "Nobody really knows what the Bourne shell's grammar is" --
	 Tom Duff, "Rc: A Shell for Plan 9"




More information about the Net-z3950 mailing list