Using Oracle Web Center Content Web Service, I am able to pass multiple search input parameters to GET_SEARCH_RESULTS.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://www.oracle.com/UCM">
<ns1:GenericRequest webKey="cs">
<ns1:Service IdcService="GET_SEARCH_RESULTS">
<ns1:User/>
<ns1:Document>
<!--ns1:Field name="QueryText">xCUSTOMER_MSISDN <contains> `044444444`</ns1:Field-->
<ns1:Field name="QueryText">xCHANNEL_ID <contains> `11222212`</ns1:Field>
AND
<ns1:Field name="QueryText">xCUSTOMER_id <contains> `08848484848`</ns1:Field>
AND
<ns1:Field name="QueryText">xCHANNEL <contains> `ISL`</ns1:Field>
</ns1:Document>
</ns1:Service>
</ns1:GenericRequest>
</soap:Body>
</soap:Envelope>
How do I pass multiple search parameter input to GET_SEARCH_RESULTS when using RDIC API?
I have this RDIC code, but I am getting parsing error as soon as I try multiple parametes. It works fine with one parameter. Please advice
public static void Search (String content_dDocName) {
String queryText = "dDocName <matches> `" + content_dDocName + "`";
// create the binder
DataBinder searchResultBinder = idcClient.createBinder();
// populate the binder with the parameters
searchResultBinder.putLocal("IdcService", "GET_SEARCH_RESULTS");
searchResultBinder.putLocal("QueryText", queryText);
searchResultBinder.putLocal("ResultCount", "20");
// execute the request
ServiceResponse searchResponse;
boolean printout = false;
for (int counter = 0; counter<1000; counter = counter+1) {
try {
searchResponse = idcClient.sendRequest(userContext, searchResultBinder);
if (!printout) {
myExecutable.logEvent("GET_SEARCH_RESULTS call successful.");
printout = true;
}
} catch (IdcClientException e) {
myExecutable.logEvent("GET_SEARCH_RESULTS failed.");
e.printStackTrace();
return;
}
DataBinder searchData;
try {
searchData = searchResponse.getResponseAsBinder();
} catch (IdcClientException e) {
myExecutable.logEvent("Unable to get response.");
e.printStackTrace();
return;
}
DataResultSet searchResults = searchData.getResultSet("SearchResults");
if (searchResults.getRows().isEmpty()) {
continue;
}
myExecutable.logEvent("Successfully got response - the following dDocName(s) were found:");
Iterator it = searchResults.getRows().iterator();
while (it.hasNext()) {
DataObject dob = (DataObject)it.next();
myExecutable.logEvent(dob.get("dDocName"));
}
return;
}
myExecutable.logEvent("Unable to get an answer in given time.");
}