Introduction
Have you ever noticed the gap between the capabilities in WebCenter Search Taskflow and the Native Secure Enterprise Search web application. The actual fact is that SES from a capability perspective is rich. For most search integration it has a rich set of features to help user navigate and find data in enormous data sets. The reason for the limited functionality in WebCenter Taskflow is not due to the Web Service API provided by SES, the Web Service API is actually as rich as the Native Search Client. However the limitation with this API is that it is based RPC based SOAP which can be hard to use when generating proxy objects. Having said all this there is an remedy to this as well, SES actually comes with a pre-generated proxy library that supports all web services features of SES. So in this Post we are going to look at where we can find the SES Proxy jar file and we will also look at how we can access the stateless services to gather all known source groups. Secondly we will look at how this can be leverage with existing WebCenter Search task flows with minimal effort.
Main Article
Best practice is to test early, therefore the project comes bundled with a JUnit Test, please run the test and make sure its not failing. The current implementation is fetching all known Source Groups from SES, but there is also an option of filtering to only include a sub set of source groups. The attached test fetches all and make sure its not empty. Prerequisite is to make sure your JDeveloper has added the JUnit extension for this run properly. The test class is: SearchExtensionDCTest.java. You can now update the test case to look for your known Source Groups
<?xml version='1.0' encoding='UTF-8'?> 2: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:pe="http://xmlns.oracle.com/adf/pageeditor" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"> <jsp:directive.page contentType="text/html;charset=UTF-8"/> <f:view> <af:document id="d1" title="Home"> <af:messages id="m1"/> <af:form id="f1"> <af:pageTemplate value="#{bindings.pageTemplateBinding.templateModel}" id="pt1"> <f:facet name="content"> <pe:pageCustomizable id="hm_pgc1"> <cust:panelCustomizable id="hm_pnc1" layout="scroll"> <af:region value="#{bindings.searchview1.regionModel}" id="r1"/> </cust:panelCustomizable> <f:facet name="editor"> <pe:pageEditorPanel id="pep1"/> </f:facet> </pe:pageCustomizable> </f:facet> </af:pageTemplate> </af:form> </af:document> </f:view> </jsp:root>
Before proceeding please deploy the project on a external weblogic instance (note you cannot do this on the internal instance)
<af:subform defaultCommand="goBtn" id="srFrm"> <af:panelGroupLayout layout="horizontal" id="sssformfpgl3" valign="top"> <af:panelGroupLayout xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="spgl1" layout="vertical" valign="top" halign="left"> <af:inputText maximumLength="128" columns="20" immediate="true" simple="true" value="#{pageFlowScope.keywords}" id="searchKeywords" contentStyle="width: 125px" partialTriggers="goBtn"/> <af:selectOneChoice xmlns:af="http://xmlns.oracle.com/adf/faces/rich" value="#{bindings.DataGroup.inputValue}" required="#{bindings.DataGroup.hints.mandatory}" shortDesc="#{bindings.DataGroup.hints.tooltip}" id="ssoc1" simple="true"> <f:selectItems xmlns:f="http://java.sun.com/jsf/core" value="#{bindings.DataGroup.items}" id="ssi1"/> </af:selectOneChoice> </af:panelGroupLayout> <af:commandImageLink id="goBtn" icon="/adf/webcenter/go_ena#{requestContext.rightToLeft ? '_rtl' : ''}.png" hoverIcon="/adf/webcenter/go_ovr#{requestContext.rightToLeft ? '_rtl' : ''}.png" depressedIcon="/adf/webcenter/go_dwn#{requestContext.rightToLeft ? '_rtl' : ''}.png" shortDesc="#{searchViewBundle.UI_LABEL_SISF_BUTTON_GO}" actionListener="#{pageFlowScope.avsbb.doSearch}"> <af:setPropertyListener xmlns:af="http://xmlns.oracle.com/adf/faces/rich" from="#{pageFlowScope.keywords}#{' sg:'}#{bindings.DataGroup.selectedValue}" to="#{pageFlowScope.avsbb.keywords}" type="action"/> </af:commandImageLink> </af:panelGroupLayout> </af:subform>