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

ServiceProcessor

Scoped name

Abstract.ServiceProcessor

Purpose

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

A ServiceProcessor function performs three steps:

  1. Receive and pre-process the data from the request
  2. Identify and call the ServiceHandler function
  3. Perform any post-process on the response data

The abstract ServiceProcessor function does not have any assumptions about how the input and output is structured or how the data should be transferred to the ServiceHandler function.

Usage

Inherit from the abstract ServiceProcessor function if you can't use one of the three implementations of the ServiceProcessor that are delivered as part of the standard WebsydianExpress installation.

This function is the most abstract ServiceProcessor function available. You should always consider whether you can use one of the more specialized abstract Service Processors:

You would normally only have to inherit directly from the abstract ServiceProcessor function if you need very specialized pre-processing and/or post-processing of the data.

Examples

To investigate how to implement the ServiceProcessor function, you can look at the local modifications of the specialized versions that are available:

In WSYAPI:

Abstract.FileServiceProcessor

In WSYAPIWS:

XMLAbstract.XMLServiceProcessor

XMLAbstract.SoapServiceProcessor

Special considerations

Please note that all ServiceProcessors 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 the service structure

Background: Handling web service requests

Background: Service processors

Abstract function: FileServiceProcessor

Abstract function: XMLServiceProcessor

Abstract function: SoapServiceProcessor