Step 1. Launch Aspire 

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

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 , select Add Service.
  2. Select HTTP Listener.

Step 3a. Specify Configuration Parameters

In the "General" tab in the Service configuration window, specify basic the service name.


Step 3b. Specify the Service Information

In the "Service" tab, configure the HTTP listener.

  1. Service name
    1. The endpoint you'll post data to. If you enter process and Aspire is running on http://localhost:50505, you'll post data to http://localhost:50505/process
  2. Accept posted data
    1. By default, Aspire will collect the parameters on the url and convert them to an Aspire job. If you want, the listener can accept posted data. If you check this box, data posted to the endpoint will be accepted. Once checked, you can choose how the posted data is treated. You have the ability to handle multi-part form data using a stream handler or a file handler, or just to have data attached as a stream to the Aspire job.
      1. If you choose a file handler, you'll have to specify and upload directory. Multi-part form data will be then be saved to that directory
      2. if you choose a stream handler, Multi-part form data will be available as a stream on the Aspire job
      3. If you choose disabled, Multi-part data will not be handled, but data posted to the service will be available as a stream on the Aspire job
  3. Transform response
    1. Requests to the listener are processed as Aspire jobs. When the job has completed, the job data from the AspireObject will be available to the client. If you wish to transform this data before it is sent, check this option and specify the the file containing the XSL transform. You can also choose to use the Saxon processor if using XLST version 2.
  4. Return mime type
    1. By default, the data returned to the client will be sent with a mime type of text/xml. You can change it here if required.
  5. Mime type in job
    1. If you need to, 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 the listener can then send back this value. Check 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.

Some advanced options are also available.

  1. Job root node
    1. By default, parameters collected from the url are placed in an AspireObject for which the root node is doc. If you want to have the root node named differently, change the value here.
  2. 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
  3. Workflow reload period
    1. Set the period after which workflow updates are reloaded
  4. 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
  5. 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.