Creating a Custom Search Service

Create a Search service that can be deployed and published in WorkSpace. The Search service is created as a Java service.

Prerequisites 

Before you start creating a custom Search service, ensure you have created a Sybase Search server connection profile and connected to the Sybase Search server.

  1. In the Enterprise Explorer, expand Sybase Search Servers > Enterprise Search > Sybase Search Server.
  2. Right-click Sybase Search Server, and select Create Custom Search Component.
  3. Select the project you want to use to build this service.

    Allow the wizard to add the Java Nature to use the Java service for the selected project, if its not already added.

  4. Click Finish to copy the custom search component files into the selected project.
  5. Right-click each WSRxxx.xsd in the Service Development - Sybase WorkSpace window and run the Create Java Bindings.
  6. Click OK to create Java service bindings.

    Do not select any default package from the drop-down list.

  7. Add the *.jar files available in the $Project\search\Search directory into the projects build path to ensure at the time of compilation these JAR files are not automatically added to the projects build path.

    You may also need to add these JAR files in the Java Service wizard.

  8. Copy the $Project\search\SearchServiceOperations.java file into the $Projects\src directory.
  9. Compile the SearchServiceOperations.java file.

    You may need to remove the package declaration or adjust it accordingly.

  10. Select File > New > Service.

    Alternatively, right-click the SearchServiceOperation.java file and select Create Service.

  11. Select the project from the list and click Next.
  12. Enter a name for the service and select Java from the User-Defined Category.
  13. Follow the onscreen instructions to create, set, and define a type for the Java endpoint.
  14. Select Reference from WorkSpace to specify the connection properties for the Java class, and click Browse to select the SearchServiceOperations.java source file for the Java service.

    See the Java Service in WorkSpace for instructions on creating and deploying a java service.

  15. Select No Service Interface and click Next to add the Sybase Search API JARs to the Java classpath.
  16. Select the operations from the source file to expose and click Finish to create the MySearchService.service. Exit from the Service Editor.

    The service file appears in the Service Explorer.

  17. Right-click MySearchService.service and select Create Sybase Services Package Profile.
  18. Close the MySearchService.svcpkgdef. In the left pane, right-click MySearchService.svcpkgdef and select Deploy Package.

    You can refer to the $Project to include the Search (Java) service. Build the package and deploy to the Service Container before using the Service Container Test wizard to test the service.

  19. After deploying to the Service Container, right-click MySearchService and select Save WSDL to create a WSDL for the selected service.
Related concepts
Sybase Search Service
Java Services
Search Administration
Related tasks
Developing a Java Service
Related reference
Starting and Stopping a Sybase Search Server

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.