Hi,
I trying integrate openKM with a java application, but i have some bugs:
1_ When i try to create a category using:
2_ I finnaly create categories by using okmFolder, and in frontend woks well, but i fail to associate this category to an document:
What i doing wrong?
I trying integrate openKM with a java application, but i have some bugs:
1_ When i try to create a category using:
Code: Select all
I got an error in taxonomy. So i clear the category table using query and restores the normal condition.OKMProperty_Service okmPropertyService = new OKMProperty_Service();
OKMProperty okmProperty = okmPropertyService.getOKMPropertyPort();
okmProperty.addCategory(token, pathCategory, "Test");
2_ I finnaly create categories by using okmFolder, and in frontend woks well, but i fail to associate this category to an document:
Code: Select all
Document doc = new Document();
doc.setPath("/okm:root/Edital");
byte[] content;
try (FileInputStream fis = new FileInputStream(arquivoLocal)) {
content = new byte[fis.available()];
fis.read(content);
}
Folder folder = new Folder();
folder.setPath(pathCategory + "/" + categoria);
doc.getCategories().add(folder);
Document newDoc = okmDocument.create(token, doc, content);
What i doing wrong?