[OPEN-ILS-DEV] Adding Z39.50 host

Bill Erickson erickson at esilibrary.com
Thu Jan 31 10:38:21 EST 2008


Bill Ott wrote:
> Has anyone else added additional Z39.50 hosts to search?
> 
> I thought this would be a simple matter of adding the host into the
> opensrf.xml <z3950> section.  However, the few I've tried have failed. 
> Am I missing something?
> 
> 
> 
> My osrfsys.log, it looks like the initial search completes, in this case
> returning 2 hits
> 

[snip]

> 
> 
> 
> From my gateway.log.  It looks like this is actually an error while
> trying to report an error.

It sure does...

[snip]

> 
> 
> 
> So, I threw the following at the perl debugger, and sure enough, I get
> two records.
> 
> use ZOOM;
> 
> $host='library.usc.edu';
> $port='2200';
> $db='unicorn';
> 
> $conn = new ZOOM::Connection($host, $port,
>                                  databaseName => "$db");
> $conn->option(preferredRecordSyntax => "usmarc");
> $rs = $conn->search_pqf('@attr 1=4 @attr 4=6 "learning perl"');
> $n = $rs->size();
> print $rs->record(0)->render();


I augmented your script to look more like the ILS code and I've been
able to condense it down to a repeatable error.

If I change the last few lines like so:

$n = $rs->size();
$rs->option(elementSetName => "FI"); # full records with no holdings
eval { print $rs->record(0)->render(); };
if($@) { die "$@\n"; }


It reports an error:

ZOOM error 100 "Unspecified error" (addinfo: "Expected CONSTRUCTED PDU
not found (pdu error: 3002)") from diag-set 'Bib-1'

I don't quite know how to parse this, but the $rs->option() is what
makes the difference.  For some reason, fetching the "full record with
no holdings" from the specified Z server is returning data the Z client
can't understand.

-bill


-- 
Bill Erickson
| VP, Software Development & Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: erickson at esilibrary.com
| web: http://esilibrary.com


More information about the Open-ils-dev mailing list