// Import needed classes from Remote Intradoc Jar import oracle.stellent.ridc.IdcClientManager import oracle.stellent.ridc.IdcContext // Create the client for request/response, connect directly to server client = (new IdcClientManager()).createClient("idc://localhost:4444") // Create a user/security context userContext = new IdcContext("sysadmin", "idc") // Setup the request, search for two pieces of content req = client.createBinder() req.putLocal("IdcService", "GET_SEARCH_RESULTS") req.putLocal("QueryText", "") req.putLocal("ResultCount", "2") // Get the response resp = client.sendRequest(userContext, req).getResponseAsBinder() // Dump out the local data of the response println "LocalData:" resp.getLocalData().keySet().each { println " $it = ${resp.getLocalData().get(it)}" } // Dump out the names of the resultsets in the response println "\nResultSets:" resp.getResultSetNames().each { println " $it" } // Dump out dDocTitle for each piece of content in the response println "\nTitles:" rsSearchResults = resp.getResultSet("SearchResults") rsSearchResults.getRows().each { println " ${it.get('dDocTitle')}" } // Wrap it up! println "\nDone"