List Info

Thread: Extended Services -




Extended Services -
country flaguser name
Australia
2007-02-12 22:19:36

Hi everyone,

 

Sorry for the long first post!

 

I’ve been trying to implement an Extended Services request using PHP Yaz but am having trouble with the syntax for the “record” or possibly “recordidnumber” part. I think I know all the parameters needed but am unsure how to structure them.

 

I’m actually trying to recreate functionality that our current vendor-provided web OPAC uses in regards to patrons placing holds on items/titles. Their system is based on OpenSiteSearch and I have the source code but I’m wary of providing an example of code as parts of it are copyright our library system vendor. Their source code makes obvious the basic args such as package-name, user-id, databaseName, function and action but the details about the particular patron and the item they are placing a hold on are obscured in code that creates the ASN.1 message of which I am having trouble following.

 

I even tried intercepting the message request between the web OPAC and LMS servers but there were additional non-printable characters that made it difficult to determine the exact message that is sent.

 

Does anyone have any idea about Extended Services updates on patron databases and what I should be looking for?

 

Additionally, I don’t seem to get any feedback in yaz_es_result() or in yaz_error() when an Extended Services request is unsuccessful or incorrectly formatted. Is that what I should be expecting?

 

Cheers

Jay

 


CONFIDENTIALITY NOTICE AND DISCLAIMER

Information in this transmission is intended only for the person(s) to whom it is addressed and may contain privileged and/or confidential information. If you are not the intended recipient, any disclosure, copying or dissemination of the information is unauthorised and you should delete/destroy all copies and notify the sender. No liability is accepted for any unauthorised use of the information contained in this transmission.

This disclaimer has been automatically added.

Re: Extended Services -
country flaguser name
Denmark
2007-02-13 03:07:54
Smith, Jay R wrote:
> Hi everyone,
> 
>  
> 
> Sorry for the long first post!
> 
>  
> 
> I’ve been trying to implement an Extended Services
request using PHP Yaz 
> but am having trouble with the syntax for the “record”
or possibly 
> “recordidnumber” part. I think I know all the
parameters needed but am 
> unsure how to structure them.
> 
>  
> 
> I’m actually trying to recreate functionality that our
current 
> vendor-provided web OPAC uses in regards to patrons
placing holds on 
> items/titles. Their system is based on OpenSiteSearch
and I have the 
> source code but I’m wary of providing an example of
code as parts of it 
> are copyright our library system vendor. Their source
code makes obvious 
> the basic args such as package-name, user-id,
databaseName, function and 
> action but the details about the particular patron and
the item they are 
> placing a hold on are obscured in code that creates the
ASN.1 message of 
> which I am having trouble following.
> 
>  
> 
> I even tried intercepting the message request between
the web OPAC and 
> LMS servers but there were additional non-printable
characters that made 
> it difficult to determine the exact message that is
sent.
> 
>  
> 
> Does anyone have any idea about Extended Services
updates on patron 
> databases and what I should be looking for?
> 
>  
> 
> Additionally, I don’t seem to get any feedback in
yaz_es_result() or in 
> yaz_error() when an Extended Services request is
unsuccessful or 
> incorrectly formatted. Is that what I should be
expecting?
> 
>  
> 
> Cheers
> 
> Jay
> 
>  

Jay - extended services in YAZPHP should be as easy as


    $record = '<record><title>A fine specimen of
a record</title></record>';

      $options = array('action' => 'recordInsert',
                       'syntax' => 'xml',
                       'record' => $record,
                       'databaseName' => 'mydatabase'
                      );

      yaz_es($yaz, 'update', $options);
      yaz_es($yaz, 'commit', array());
      yaz_wait();

      if ($error = yaz_error($yaz))
        echo "$error";


to cite an example from the Zebra documentation
  http://www.indexdata.com/zebra/doc/admini
stration-extended-services.tkl

See also YAZ docs on this:
http://www.indexdata.com/yaz/doc/zoom.extendedservices
.tkl

But it might be that your server is not acting as it
should... as a 
second strategy, you might want to try a yaz-client based
manual 
extended service session to figure out the right parameters.
Se the 
example on the Zebra docs above.


If your patron server can not figure out the correct
internal record ID 
from the record itself, you need also to provide one of the
two 
parameters: recordIdOpaque or recordIdNumber.

Finally, pay attention to the difference between the two
following

recordIdOpaque   	 string
    	 Optional client-supplied, opaque record identifier
used under
          insert operations.

recordIdNumber 	positive number
  	Zebra's internal system number, not allowed for
recordInsert or
         specialUpdate actions which result in fresh record
inserts.

Your patron Z3950 server makes possibly the same - or a
similar - 
distinction as Zebra between those two parameters, and you
have to 
experiment which one you need to call, or you have to read
the manual of 
your server.


The full YAZ PHP docs are at

http://www.p
hp.net/manual/en/ref.yaz.php

I hope these pointers are enough to get you on track.

Your's  Marc Cromme, Index Data


-- 

Marc Cromme
M.Sc and Ph.D in Mathematical Modelling and Computation
Senior Developer, Project Manager

Index Data Aps
Købmagergade 43, 2
1150 Copenhagen K.
Denmark

tel: +45 3341 0100
fax: +45 3341 0101

http://www.indexdata.com


INDEX DATA Means Business
for Open Source and Open Standards





_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list

RE: Extended Services -
country flaguser name
Australia
2007-02-13 21:40:44
Thanks Marc for the quick response.

The PHP syntax itself is fine but I'm struggling with the
record syntax itself, I guess. In the example you provided
it is in xml but the existing system uses ASN.1 and I have
no idea what the resulting message looks like. I have seen
the notation spec but am not sure where the record info fits
in.

I have clearly defined parameters for most things but then I
have 3 more pieces of information that need to go somewhere
and I'm not sure where.

I have package-name, user-id, databaseName, function and
action, for example, but the other pieces are:

A patron ID
A patron phone number (used to authenticate the patron
somehow)
The item/title to be placed on hold

I have tried using a manual session with the client that
came with Yaz and I receive this error no matter how I try
formatting things:

Got extended services response
Status: failure
Diagnostic message(s) from database:
Missing or unknown diagset
	[1006] Response records in Search response not possible for
specified database (or database combination) -- v2 addinfo
'2'.

The manual for the Z39.50 server that comes with our LMS is
very lacking and doesn't describe the syntax at all, merely
that the option to perform patron functions are possible.

It seems the only way to work it out might be to contact our
vendor, which I was hoping not to do! 

Cheers
Jay

-----Original Message-----
From: yazlist-bounceslists.indexdata.dk
[mailto:yazlist-bounceslists.indexdata.dk] On Behalf Of marc
Sent: Tuesday, 13 February 2007 8:08 PM
To: Discussion on the YAZ Z39.50 toolkit
Subject: Re: [Yazlist] Extended Services -

Smith, Jay R wrote:
> Hi everyone,
> 
>  
> 
> Sorry for the long first post!
> 
>  
> 
> I've been trying to implement an Extended Services
request using PHP Yaz 
> but am having trouble with the syntax for the
"record" or possibly 
> "recordidnumber" part. I think I know all the
parameters needed but am 
> unsure how to structure them.
> 
>  
> 
> I'm actually trying to recreate functionality that our
current 
> vendor-provided web OPAC uses in regards to patrons
placing holds on 
> items/titles. Their system is based on OpenSiteSearch
and I have the 
> source code but I'm wary of providing an example of
code as parts of it 
> are copyright our library system vendor. Their source
code makes obvious 
> the basic args such as package-name, user-id,
databaseName, function and 
> action but the details about the particular patron and
the item they are 
> placing a hold on are obscured in code that creates the
ASN.1 message of 
> which I am having trouble following.
> 
>  
> 
> I even tried intercepting the message request between
the web OPAC and 
> LMS servers but there were additional non-printable
characters that made 
> it difficult to determine the exact message that is
sent.
> 
>  
> 
> Does anyone have any idea about Extended Services
updates on patron 
> databases and what I should be looking for?
> 
>  
> 
> Additionally, I don't seem to get any feedback in
yaz_es_result() or in 
> yaz_error() when an Extended Services request is
unsuccessful or 
> incorrectly formatted. Is that what I should be
expecting?
> 
>  
> 
> Cheers
> 
> Jay
> 
>  

Jay - extended services in YAZPHP should be as easy as


    $record = '<record><title>A fine specimen of
a record</title></record>';

      $options = array('action' => 'recordInsert',
                       'syntax' => 'xml',
                       'record' => $record,
                       'databaseName' => 'mydatabase'
                      );

      yaz_es($yaz, 'update', $options);
      yaz_es($yaz, 'commit', array());
      yaz_wait();

      if ($error = yaz_error($yaz))
        echo "$error";


to cite an example from the Zebra documentation
  http://www.indexdata.com/zebra/doc/admini
stration-extended-services.tkl

See also YAZ docs on this:
http://www.indexdata.com/yaz/doc/zoom.extendedservices
.tkl

But it might be that your server is not acting as it
should... as a 
second strategy, you might want to try a yaz-client based
manual 
extended service session to figure out the right parameters.
Se the 
example on the Zebra docs above.


If your patron server can not figure out the correct
internal record ID 
from the record itself, you need also to provide one of the
two 
parameters: recordIdOpaque or recordIdNumber.

Finally, pay attention to the difference between the two
following

recordIdOpaque   	 string
    	 Optional client-supplied, opaque record identifier
used under
          insert operations.

recordIdNumber 	positive number
  	Zebra's internal system number, not allowed for
recordInsert or
         specialUpdate actions which result in fresh record
inserts.

Your patron Z3950 server makes possibly the same - or a
similar - 
distinction as Zebra between those two parameters, and you
have to 
experiment which one you need to call, or you have to read
the manual of 
your server.


The full YAZ PHP docs are at

http://www.p
hp.net/manual/en/ref.yaz.php

I hope these pointers are enough to get you on track.

Your's  Marc Cromme, Index Data


-- 

Marc Cromme
M.Sc and Ph.D in Mathematical Modelling and Computation
Senior Developer, Project Manager

Index Data Aps
Købmagergade 43, 2
1150 Copenhagen K.
Denmark

tel: +45 3341 0100
fax: +45 3341 0101

http://www.indexdata.com


INDEX DATA Means Business
for Open Source and Open Standards





_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list


CONFIDENTIALITY NOTICE AND DISCLAIMER

Information in this transmission is intended only for the
person(s) to whom it is addressed and may contain privileged
and/or confidential information. If you are not the intended
recipient, any disclosure, copying or dissemination of the
information is unauthorised and you should delete/destroy
all copies and notify the sender. No liability is accepted
for any unauthorised use of the information contained in
this transmission.

This disclaimer has been automatically added.
_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )