Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Image Removed

Step 1. Launch Aspire

and open the Services Management Page

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

Panel
titleOn this page

Table of Contents

Image AddedStep 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

2

3. Add a

new HTTP

New HTTP listener service

Image Modified

To create a new service:

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

Step

2a. Specify 

3a. Specify aBasic Service NameImage Modified

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




  

Step

2b

3b. Specify

the

Service InformationImage Modified

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

  1. Service name
    • The endpoint where you
    'll
    • will post data
    to you'll post
  2. Accept posted data
    • By default, Aspire
    will collect
    • collects the parameters on the
    url
    • URL and
    convert
    • converts them to an Aspire job.
    If you want, the
    • The listener can accept posted data. 
      • If you select the check
    this
      • box, data posted to the endpoint will be accepted. 
      • Once
    checked
      • selected,
    you can
      • choose how the posted data
    is
      • should be treated. You
    have the ability to
      • can 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.
        • If
    you choose a
        • file handler is selected,
    you'll have to
        • specify
    and
        • an upload directory. Multi-part form data will
    be then
        • be saved to that directory
    if you choose
        • If a stream handler is selected,
     Multi
        •  multi-part form data will be available as a stream on the Aspire job.
      • If
    you choose disabled, Multi
      • Disabled, multi-part data will not be handled. Instead,
    but
      • 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
    has completed
    • completes, the job data from the AspireObject
    will be
    • is available to the client.
    If you wish to transform this
    •  
    • To transform data before it is sent,
    check
    • select this option and specify
    the the
    • 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
    will be
    • is sent with a mime type of text/xml. You can change it
    here
    • , if
    required
    • desired.
  5. Mime type in job
      If you need to, you
      • 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
      • them the  listener can then send
      back
      • this value back.
      Check
      •  
      • 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

Image ModifiedStep

2c

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

3

4: Send

data

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.