Enqueueing 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 using this function must contain a valid URL that specifies at least the following:

protocol://pathname

Enqueueing a URL that does not conform to at least this basic syntax will produce undefined results.

Tip: Whenever you are experimenting with search collections and enqueueing, it is good practice to check the status of the collection using the Watson Explorer Engine administration tool. See API-Based Applications and 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.