I have a problem that when I try to add keywords to a parent keyword it add's it to the category instead (This because the webdav url is /Category/Keyword instead of /Category/ParentKeyword/Keyword)
Now I found that you have to create a LinkToKeywordData but when i try the following code, it will throw a nullpointerexception on the getWebdavUrl setvalue. What is the correct way of getting a LinkToKeywordData and ArrayOfLinkToKeywordData?
ArrayOfLinkToKeywordData array = new ArrayOfLinkToKeywordData();
for(Keyword parent : keyword.getParents()){
LinkToKeywordData link = new LinkToKeywordData();
link.getWebDavUrl().setValue(parent.getWebdavUrl());
array.getLinkToKeywordData().add(link);
}
keywordData.getParentKeywords().setValue(array);