Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

USING MULTIPLE PARAMETERS FOR GET_SEARCH_RESULTS USING RDIC API

2611729Jan 14 2015 — edited Jan 15 2015

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 &lt;contains> `044444444`</ns1:Field-->

               <ns1:Field name="QueryText">xCHANNEL_ID &lt;contains> `11222212`</ns1:Field>

               AND

               <ns1:Field name="QueryText">xCUSTOMER_id &lt;contains> `08848484848`</ns1:Field>

               AND

               <ns1:Field name="QueryText">xCHANNEL &lt;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.");

}

This post has been answered by Prashant Patil on Jan 15 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2015
Added on Jan 14 2015
4 comments
1,541 views