Tell me more ×
Libraries & Information Science Stack Exchange is a question and answer site for librarians and library professionals. It's 100% free, no registration required.

In Aleph v20, I want to use the update-doc X-Service. I have a script set up to do this:

  1. HTTP GET xml from /X?op=find-doc&base=BASE&doc_num=XXXXXXXXX
  2. edit the xml
  3. HTTP POST the edited xml back to /X?op=update-doc&base=BASE&doc_num=XXXXXXXXX&doc_action=UPDATE&user_name=USER&user_password=PASS&xml_full_req=EDITED_XML

Aleph always responds with:

<update-doc>
<session-id>SOME SESSION ID</session-id>
</update-doc>

i.e., no error messages, but no success message, either. It does the same thing when I send an invalid doc_action parameter. Is UPDATE an invalid doc_action parameter?

Has anyone made the update-doc service work?

PS I don't control (or know much about) the Aleph server configuration.

EDIT: The x-service user did not have sufficient privileges in the Aleph cataloging module. Once that was fixed by our Aleph server admin, the steps above worked properly (find-doc, edit the response, POST the edited response back to update-doc)

share|improve this question

2 Answers

up vote 0 down vote accepted

I just read somewhere that this behaviour could also occur when you do not have sufficient rights.

share|improve this answer
1  
Any idea where you read this? What do you mean by sufficient rights? – Ashley Nunn Dec 6 '12 at 15:45

The X-Server for DigiTool--which seems to be very similar to Aleph's--requires that a session ID string be provided for some queries ("The session-id must be included in every subsequent query string...").

Have you tried logging in with the X-Server "login" operation (something like http://HOST/X?op=login&USER_NAME=Name&USER_PASSWORD=Password), collecting the returned session-id, and including it as a parameter with your HTTP post (e.g., ...&SESSION_ID=whatever)?

Alternatively, perhaps there is a problem with your XML--are you sending the XML document as a URL parameter? If so, is it properly encoded?

Also, note that you can view some documentation for the X-Server at http://HOST/X?op=explain.

share|improve this answer
Thanks for the tips. I have tried adding the current session-id in the request; the behaviour is the same. The body of the XML is posted in the xml_full_req argument, and I'm certain it's properly encoded. (well, as certain as I can be -- I use the same process to encode the input XML for the similar update-bor X-Service, and I'm using that one to successfully edit patron records). – Brad Sep 10 '12 at 0:47
I just skimmed over the Aleph X-Server docs for "update-doc", and it looks like BASE is not a supported parameter key for the "update-doc" action. It looks like LIBRARY is used instead (presumably with the same five character base value). Maybe try changing /X?op=update-doc&base=BASE&doc_num=XXXXXXXXX&doc_action=UPDATE&user_name=USER&u‌​ser_password=PASS&xml_full_req=EDITED_XML to /X?op=update-doc&library=BASE&doc_num=XXXXXXXXX&doc_action=UPDATE&user_name=USE‌​R&user_password=PASS&xml_full_req=EDITED_XML – kardeiz Sep 10 '12 at 15:30
I've tried both, and omitting it altogether. The correct form is 'library', but making it correct doesn't solve my problem. Thanks again. – Brad Sep 13 '12 at 19:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.