Page 1 of 1

Avoiding multiple calls for document upload.

PostPosted:Thu Apr 20, 2017 10:59 am
by PSHREYASHOLLA
Hi,

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 :?:

Re: Avoiding multiple calls for document upload.

PostPosted:Sat Apr 22, 2017 9:39 am
by jllort
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.