[Net-z3950] SimpleServer and GRS1 output.

Mike Taylor mike at indexdata.com
Thu Feb 8 13:21:10 CET 2007

Jan Bauer Nielsen writes:
 > I have used SimpleServer to create an application capable of merging 
 > result sets from a number of different servers. Internally I use the 
 > ZOOM module to query the underlying server. In some cases I need to 
 > return records in GRS1 format, and I simply do a
 > $args->{RECORD} = $set->record($pos)->render();
 > Output from the render() method might be something like this:
 > (3,localInfo)
 >      (3,source) elsevier
 >      (3,media) electronic
 >      (3,fullTxtRef) /elsevier/ohl0163a/03014207/sz974452/97000354.pdf
 > [...]
 > But on the client side this is what I get:
 > (3,localInfo)
 > (3,source) elsevier
 > (3,media) electronic
 > (3,fullTxtRef) /elsevier/ohl0163a/03014207/sz974452/97000354.pdf
 > [...]
 > The nesting has suddenly disappeared. Am I doing something wrong,
 > or has the SimpleServer somehow altered the record along the way?

The best way to find out what's going on here is to generate an APDU
dump, which tells you the True Story of what's happening on the wire.

Please connect to your SimpleServer-based merging server using
	yaz-client -a apdulog the.address.of.your:201/server
do a search and a retrieval, exit yaz-client, and email me the
generated file "apdulog".  Then we'll see what's going on.  One
possibility is that the record is being built and transferred just
fine, but the client is displaying it wrongly.

We may as well come out and admit that the GRS-1 handing in
SimpleServer is pretty iniquitous: there are no Perl structures
defined to represent a GRS-1 record, so the only representation is a
string containing the rendered record, as in your first example above
-- the only way to get SimpleServer to return GRS-1 is by making up a
rendered record and returning it for the glue-code to re-parse and
build into C-level GRS-1 structures for serialisation.  This
re-parsing is obviously error-prone.  I think we would have fixed it
ages ago if we'd known anyone who was still using GRS-1 :-)

 _/|_	 ___________________________________________________________________
/o ) \/  Mike Taylor    <mike at indexdata.com>    http://www.miketaylor.org.uk
)_v__/\  "America is not really a melting pot [...] America is a bunch
	 of different groups that, when times aren't so good, don't get
	 on so well" -- Paul Simon.

More information about the Net-z3950 mailing list