The Zombie Stack Exchanges That Just Won't Die
In Aleph v20, I want to use the update-doc X-Service. I have a script set up to do this:
/X?op=find-doc&base=BASE&doc_num=XXXXXXXXX
/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)
Brad
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
.
I just read somewhere that this behaviour could also occur when you do not have sufficient rights.