Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.5

FileServiceProcessor

Scoped name

Abstract.FileServiceProcessor

Purpose

ServiceProcessor functions are called when the runtime has identified that a request is a web service request and the ServiceProcessor function is specified for the URL of the request.

A FileServiceProcessor function performs three steps:

  1. Receive and save the data from the request in a file.
  2. Identify and call the ServiceHandler function. The name and location of the input file and the output file is transferred to the ServiceHandler.
  3. Reads the output file and returns the data to the client.

The FileServiceProcessor function can be used when the input and output data are saved as files. The function does not process the data before or after the call to the ServiceHandler.

Usage

Inherit from the abstract FileServiceProcessor function if you want to handle the received and returned data as files.

You should first investigate whether you can use the implemented FileServiceProcessor that is delivered with the standard WebsydianExpress installation. If your only reason for creating a special version is that you need to use a special selection criterion that is not handled by the implemented FileServiceProcessor, you should first look at the "Program" selection criterion. This special criterion makes it possible for you to specify a program that handles the selection of the ServiceHandler based on you own logic.

The most common reason for creating your own version of the abstract FileServiceProcessor is if you need to either pre-process the data in the file before sending it to the handler or perform a post-process on the output file before returning the data to the client.

Special considerations

Please note that all ServiceProcessor functions are called dynamically based on the entries specified in the service structure tree. This means that you may not change the interface of the implemented function.

More information

Background: Understanding service structure

Background: Handling web service requests

Background: Service processors

Background: Selection criteria