Web Services in FME Workspaces

Triggering a Workflow:

Workspace require an input feature in order to run, traditionally this has been provided by a Reader reading a dataset and passing the features into the workflow for processing.

When working with web services often the data in the web service is what we want to work with and we want the request to the service to be our Reader.

In these cases were there is no requirement for a Reader we can use the creator transformer to add a blank feature into the Workspace we can use to trigger our request to the web service.

The Creator can be used as is and does not need to be configured in most cases. More information on this transformer can be found here Creator Overview.


HTTP Caller:

HTTPCaller

The HTTPCaller is primary method of making a web request within FME and can contain a large amount of logic.

HTTPCaller Parameter Window

Supported HTTP Methods

Query String Parameters and Header

HTTP Response Handling

HTTP Client Options

Authentication

More detail can be found here at the HTTPCaller Overview.


Slowing things Down:

It may seem strange to want to slow FME down especially when normally so much time and effort goes into optimising a Workspace to run as a quickly as possible but many web services are rate limited. Often free services or a free tier only support a limited number of requests per minute.

This means that only so many requests can be made within a given timeframe, for example a service might only support 10 requests a minute. If more requests than this are made then the service will return an error or stop responding. In the extreme some services may take a high request rate as an attempted denial of service attack and block your IP from making requests at all!

If you are using a single Creator you are unlikely to have an issue but if for example your Workspace makes is geocoding a number of addresses from a spreadsheet using a web service you might have hundreds or thousands of records which FME will fire off instantly!

To avoid this FME has a Decelerator transformer which allows only a certain number of features per second or a per feature delay. Adding the transformer will allow the requests to be made at a supported rate.

More information can be found on here Decelerator Overview.