LogicalDOC Update API

We tried to make LogicalDOC as intuitive as possible, but an advice is always welcome.

Moderator: car031

vanmark
Posts: 3
Joined: Mon Nov 09, 2015 12:48 am

LogicalDOC Update API

Wed Dec 02, 2015 7:23 pm

I am a new user to LogicalDOC. I am not sure if I understand how the DocumentService Update api function works. You ask for the Session ID, but, how do you know which Document ID that you want to update? I have been using SOAPUI to test, and I keep getting errors.

From the LogicalDOC API page:
-----------------------------------------------------------------------------------------------------------------------
void update(String sid, WSDocument document)

This operation allows to update an existing document. The user can completely customize the document values through a value object containing the metadata of the new document.

Parameters

sid - The session's identifier.
document - The value object containing the document metadata.
Returns

none
Throws

Exception - If the document doesn't exist.
-----------------------------------------------------------------------------------------------------

The document ID is a field in the WSDocument parameters, but it appears there is no "retrieve" to pull the correct document, then update the parms, then put it back.

Do I have to "get" the document first?

If anyone can offer a little more insight on how this works, that would be great.

Also, please note, we are using an unconventional system to use the SOAP interface; the samples provided will not work for us. We are using an IBM iSeries system which requires a whole different set of programming skills.

Thanks!
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: LogicalDOC Update API

Sun Jan 10, 2016 7:16 pm

Hi vanmark,
in order to update the metadata of a document you should first get the WSDocument using the method

Code: Select all

WSDocument getDocument(String sid, long docId) 
then you should change any metadata in the WSDocument object value.
Then you shoul apply the changes using the method

Code: Select all

void update(String sid, WSDocument document) 
The method update doesn't return anything if all is OK, otherwise you will get an exception.

Inested if you need to update the file of a document you should use the method

Code: Select all

void upload(String sid, long docId, long folderId, String fileName, String language, DataHandler content) 
or checkout/checkin methods.
Alex

Return to “Usage”

Who is online

Users browsing this forum: No registered users and 32 guests