FME Flow: 2024.2

Data Streaming Service

The Data Streaming service accepts and carries out transformation requests as specified by a workspace, returning the results as a data stream, instead of providing a link to it.

This service provides data feeds for various clients in formats such as GeoRSS, GeoJSON, GML and KML. The MIME type header is returned with the data wherever possible.

Data Streaming service requests are made as either URL or form requests. For example:

http://<host>/fmedatastreaming/<repository>/<workspace>.fmw?<parameters>

The resulting dataset is one file only. After the translation has finished, this dataset is streamed with the appropriate content-type (MIME type) over HTTP back to the client making the request. For example, a web browser or Google Earth are clients that could make the request.

Note  content-type is determined by the first writer added to a workspace. For example, if a Google KML writer is added to a workspace, followed by an Adobe 3D PDF writer, the Data Streaming service sends content-type application/vnd.google-earth.kmz. If a PDF writer is added first, followed by an OGCKML writer, the content-type is application/pdf.

The Data Upload Service works in conjunction with the Data Download, Data Streaming, and Job Submitter services to upload files.

Requirements

The streaming service can accept workspaces that write single or multiple files. If the output contains more than one file, the service creates and streams a zip file containing all output files. No published parameters are required.

Note  Output can include workspaces that write HTML, PNG, KML, GeoRSS, GeoJSON, PDF, and others.

Service Specific Request Parameters

Name

Value

Description

opt_responseformat

xml | json
Default: xml

Defines the language of the response. The text must be all lowercase.

opt_geturl The URL to a dataset The URL of the source dataset to be used for transformation
opt_showresult true | false It indicates whether the XML/JSON responses from these three services include the FME transformation result. The default value is true if this parameter is not present.

Using Remote Data During a Request

Using data from HTTP POST body as Reader dataset

This web service can receive data and override source dataset via HTTP POST. The content of the POST request body will be saved to a temporary file which will be used as the Reader dataset of the workspace. If there is more than one reader in the workspace, then you will need to indicate which reader will use the temporary file. You indicate your choice when publishing the workspace by editing the service registration.

Using data from HTTP GET as Reader dataset

This web service can receive data and override Reader dataset via HTTP GET. The dataset should be specified as a URL and passed to service by 'opt_geturl' parameter. Both HTTP and FTP URLs are supported. If there is more than one reader in the workspace, then you will need to indicate which reader will use the temporary file. You indicate your choice when publishing the workspace by editing the service registration.

For example here is a service request that uses a remote KMZ dataset:

http://localhost/fmedatastreaming/Test/Viewer.fmw?opt_geturl=http://data.vancouver.ca/download/kml/elementary_school_boundaries.kmz

Response Elements

If the response format is specified as XML or JSON, a service failure response may contain the elements shown in the following table.

Element

Child Elements

Value

Description

statusInfo

message

message string

service failure message

status

success | failure

service status

fmeTransformationResult

fmeServerResponse

FME Flow response properties

FME Flow response

fmeEngineResponse

FME Engine response properties

FME Engine response

Providing OGC Web Feature Services and Web Mapping Services

The Open Geospatial Consortium (OGC) Web Feature Service (WFS) allows a client to retrieve and update geospatial data encoded in Geography Markup Language (GML) from multiple Web Feature Services. Using these interfaces, a user or service can combine, use, and manage geodata – the feature information behind a map image – from different sources.

The OGC Web Mapping Service (WMS) supplies WMS functionality.

In FME Flow, the WFS and WMS are supported by the Data Streaming Service. To create your own WFS or WMS, customize workspace templates that are provided for you, and register the workspace to the FME Flow data streaming service. For more information:

See Also