Enqueuing a URL
The simplest way to enqueue data that can be referenced through a URL is to use the search-collection-enqueue-url function:
XML message:
<SearchCollectionEnqueueUrl xmlns="urn:/velocity/types">
<collection>my-new-collection</collection>
<url>http://vivisimo.com</url>
</SearchCollectionEnqueueUrl>
In C#:
SearchCollectionEnqueueUrl sceu = new SearchCollectionEnqueueUrl();
sceu.collection = COLLECTION;
sceu.url = ENQ_URL;
sceu.forceallow = true;
SearchCollectionEnqueueUrlResponse enqresp = port.SearchCollectionEnqueueUrl(sceu);
In Java:
SearchCollectionEnqueueUrl sceu = new SearchCollectionEnqueueUrl();
sceu.setCollection(COLLECTION);
sceu.setUrl(ENQ_URL);
SearchCollectionEnqueueUrlResponse enqresp = port
.searchCollectionEnqueueUrl(sceu);
Any data that you enqueue by using this function must contain a valid URL that specifies at least the following:
protocol://pathname
Enqueuing a URL that does not conform to at least this basic syntax produces undefined results.
Tip: Whenever you are experimenting with search collections and enqueuing, it is good
practice to check the status of the collection by using the Watson Explorer Engine administration tool. For more information about using the
Watson Explorer Engine administration tool when developing applications
using the Watson Explorer Engine API, see API-Based Applications and the Watson Explorer Engine Administration Tool.