Avoiding multiple calls for document upload.

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu Dec 22, 2016 4:18 am

Avoiding multiple calls for document upload.

Post by PSHREYASHOLLA » Thu Apr 20, 2017 10:59 am


We are using SDK Java 1.1 for uploading a document,

Code: Select all

OKMWebservices ws= OKMWebservicesFactory.newInstance(host, user, password);
Document doc=ws.createDocumentSimple(docPath, stream);
ws.setPropertyGroupPropertiesSimple(doc.getUuid(),PROPERTY_NAME, properties);
Here there are 2 calls made to OpenKM,
1. ws.createDocumentSimple(docPath, stream) : To upload a document,
2. ws.setPropertyGroupPropertiesSimple : To set properties for that document,

Is it possible to achieve this using a single call :?:

Posts: 9896
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain

Re: Avoiding multiple calls for document upload.

Post by jllort » Sat Apr 22, 2017 9:39 am

The idea of the webservices is get is as atomic as possible, that's why REST API is build with atomic methods.
You should modify source code for it extending actual REST WS with your owns, or go to professional edition where REST WS can be extended with plugin ( similar but not exactly the same ).

If you need we guide about classes are involved with community edition, tell us.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests