• Working with search results

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
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.
 #30088  by holgrich
 
Dear all,

I am currently trying to integrate OpenKM into my Grails application. I already set up the openKM instance on our server and binded the openKM lib into the Grails lib. Now I want to implement some sample to understand how he openKM API works. After I uploaded some files, I tried to search them. That works:
Code: Select all
def okmSample(){

        OKMAuth okmAuth = new OKMAuth_Service().getOKMAuthPort();
        OKMSearch okmSearch = new OKMSearch_Service().getOKMSearchPort()
        OKMDocument okmDocument = new OKMDocument_Service().getOKMDocumentPort();

        // Login
        String token = okmAuth.login("hdiedrich", "password");
        Console.println("Token: " + token );

        // Search
        def xs = okmSearch.findByName(token, "Setup");

        // Logout
        okmAuth.logout(token)
    }

The variable xs is an Arraylist that contains three elements (QueryResults). Each element has five attributes (attachement, document, excerpt, folder, mail) that are null and the score.
Is this expected behaviour?
If yes, how do I extract the path and/or UUID of the files that have been found in the search?
Of no, any idea whats going wrong?

Regards,
holgrich
 #30125  by jllort
 
OpenKM SDK for Java use internally rest and you were using SOAP, is not the same. We suggest always using OpenKM SDK because if there're changes in API will got best control on it.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.