Step 1. Launch Aspire

Launch Aspire (if it's not already running). See:

On this page

Step 2. Open the Services Management Page

Browse to: http://localhost:50505.

For details on using the Aspire Services Management page, please refer to Admin UI


Step 3. Add a New HTTP listener service

To create a new service:

  1. From the Service Manger , click Add Service.
  2. Click HTTP Listener.


Step 3a. Specify aBasic Service Name

In the General tab in the Service Configuration window, specify a basic the service name.


  

Step 3b. Specify Service Information

In the Service tab, configure the HTTP listener.

  1. Service name
  2. Accept posted data
    • By default, Aspire collects the parameters on the URL and converts them to an Aspire job. The listener can accept posted data. 
      • If you select the check box, data posted to the endpoint will be accepted. 
      • Once selected, choose how the posted data should be treated. You can handle multi-part form data using a stream handler or a file handler, or just have data attached as a stream to the Aspire job.
        • If a file handler is selected, specify an upload directory. Multi-part form data will be saved to that directory
        • If a stream handler is selected, multi-part form data will be available as a stream on the Aspire job.
      • If Disabled, multi-part data will not be handled. Instead, data posted to the service will be available as a stream on the Aspire job.
  3. Transform response
    • Requests to the listener are processed as Aspire jobs. When the job completes, the job data from the AspireObject is available to the client. 
    • To transform data before it is sent, select this option and specify a file containing the XSL transform. (You can also choose to use the Saxon processor if using XLST version 2.)
  4. Return mime type
    • By default, the data returned to the client is sent with a mime type of text/xml. You can change it, if desired.
  5. Mime type in job
    • You can extract the mime type to send back from the AspireObject. This allows the processing to choose the mime type of the response, set it to a field in the AspireObject, and them the  listener can then send this value back. 
    • Select this option and specify the field containing the mime type to be returned. The field must exist as a child of the root (ie a parameter value of mimeType looks for value in the /doc/mimeType field in the default AspireObject) . If the field does not exist or is empty, then the mime type reverts back to the value from the parameter above.
      NOTE: The value is extracted before the transformation (if any) is applied.

Advanced Options

Some advanced options are also available.

  1. Wait for job
    1. The listener waits for the Aspire job to complete before returning data to the client. If you want the listener to return immediately, un-check this option. In this case the return data from the job is lost
  2. Workflow reload period
    1. Set the period after which workflow updates are reloaded
  3. Error tolerant
    1. When unchecked, an error in the workflow processing halts all workflow processing for that job. When checked, only the errored rule is not processed
  4. Debug workflow
    1. Check to enable debug output for the workflow

Step 3c. Specify Workflow Information

In the "Workflow" tab, specify the workflow steps for the jobs emitted by the listener. Drag and drop rules to determine which steps should an item follow after being received. These rules could be where to publish the document or transformations needed on the data before sending it to a search engine. See Workflow for more information.

  1. For the purpose of this tutorial, drag and drop the Publish To File rule found under the Publishers tab to the onProcess Workflow tree.
    1. Specify a Name and Description for the Publisher.
    2. Click Add.

After completing this steps click on the Save then Done and you'll be sent back to the Home Page.


Step 4: Send Data


As soon as the service is saved it will run. Data can then be sent to the endpoint using curl, or by simply using a web browser.

  1. curl --data-binary "@<filename>" http://localhost:50505/process

While the service is running

While the service is running, click on the "Refresh" button on the Services Manager page. The status will show RUNNING.
To stop the service, press the stop icon on the service tile. NOTE: you must stop the service to edit the parameters.