Using the Web Services Converter

Web services often offer text analysis functions that can enrich your documents. The Web Services converter accesses web service functions via their REST API and adds the response to your document, which you may optionally post-process in your own custom converter.

About this task

The Web Services converter is used to augment data with content and analysis from an external web service while that data is being ingested. It is generalized for use with nearly any web service. All Watson Explorer converters (including this one) process the text to be indexed at ingestion time. When configured properly, the Web Services converter will send administrator-defined name-value pairs as CGI parameters to a REST-based web service. The response from the REST web service is then stored in its entirety in a new administrator-specified <content> element. The Web Services Converter is designed to work in conjunction with two custom converters which handle:

Note: IBM recommends complementing this out of the box architecture with a caching proxy. Routing web service calls through a caching proxy can speed up refreshes and recrawls in some situations, overcome some network failures, and may also allow you to reduce the total number of web service transactions.

For an example of the Watson Explorer Web Services converter configured for use with the Watson Developer Cloud Relationship Extraction service, see the wex-web-services-converter example on GitHub.

Additional Watson Explorer cloud integrations can also be found on GitHub.

Implementation considerations:

Adding the Web Services Converter

Procedure

  1. Navigate to the Configuration tab for the search collection that will be indexing the documents you want to augment with content from an external web service.
  2. Select the Converting sub-tab.
  3. Click the Add a New Converter button. The Add a New Converter dialog displays.
  4. Choose Web Services from the list and click Add.
  5. Click OK.

What to do next

After the Web Services Converter is added, you need to configure it.
  1. In the Web Service endpoint URL text box, supply the endpoint URL for your external web service.
  2. In the Contents to send as name/value pairs text area, enter the name of each CGI parameter you want to send to the web service on its own line.
  3. Click OK.

After successfully completing these tasks, you must create two custom converters. The first is one for preprocessing text. See Creating the Custom Converter for Pre-Processing Text.

See Custom Converters for more information about custom converters.