You are here: 参考手册 > FME Server Web Services > Transformation Services > Data Download Service

Data Download Service

The Data Download Service provides users with the output from a workspace as a downloadable zip file. Typically the service allows users to specify the data layers, format and coordinate system for the download.

This service is requested using a URL or a form. For example:

http:///fmedatadownload公司//<工作区>.fmw?

打开一个网页,其中链接到包含工作区转换结果的zip文件。此外,还可以发送带有zip文件链接的电子邮件。

由于以下原因,下载将作为zip(压缩存档)文件返回:

  • 结果是许多输出数据集(而不仅仅是一个数据集)。
  • Folder-based datasets do not consist of a single file; for example, ESRI Shape format has files with the extension .shp, .shx, .dbf, and some others.
  • 基于文件的数据集可能由莫re than one file; for example, a GML dataset includes both a GML file and an XSD (XML Schema Definition) file.

Note:The zip file from workspaces that write multiple datasets to a fanout directory is comprised of multiple folders that contain the separate datasets. These folders are contained within a single folder whose name is based on the Destination Fanout Directory.

FME Server can also provide output that is not zipped by using theData Streamingservice.

The数据上传服务与数据下载、数据流和Job Submitter上传文件的服务。

要求

此服务适用于任何编写单个或多个文件的工作区。不需要发布的参数。无法在目标为数据库格式的工作区上运行数据下载。

Note:You may want to publish some parameters from your workspace to control the translation from the URL or form request. For example, feature types to read, output coordinate system, and format (generic writer) are commonly published parameters when using this service.

服务特定请求参数

Name

价值

说明

opt_responseformat

xml | json
默认值:xml

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

opt\u获取URL The URL to a dataset The URL of the source dataset to be used for transformation
opt_showresult true | false Whether the XML/JSON responses include the FME transformation result. The default value is true if this parameter is not present.
opt_servicemode 同步|异步| schedule

在服务的同步和异步模式之间切换。当作业异步提交(async)时,将立即返回提交成功或失败的响应。当设置为synchronous(sync)时,在作业完成之前不会返回响应。

Or, schedules a data download request to run at a specified start time (one-time only). If schedule is specified, see below for additional parameters.

选择请求邮件 comma-separated e-mail addresses 通知电子邮件发送到的地址。

Notification Directives

此服务支持Notification Directives.

计划数据下载请求

Usingopt\u servicemode=计划, you can schedule a data download request to run once at a specified start time. The following additional parameters are required:

Name 价值 说明
触发 跳动 Indicates the job is scheduled to run once. Only跳动支持。
start <yyyy-MM-dd HH:mm:ss> the date/time to run the job. If the date/time is earlier than the current time, the job runs immediately.
类别 <类别_name> 任务所属的常规类别或组的名称。
name <schedule name> 任务的名称。名称在类别中必须是唯一的。计划运行一次的任务完成后,它将被自动删除。
description <description> The description of the task.

在请求期间使用远程数据

Using data from HTTP POST body as Reader dataset

这个web服务可以通过httppost接收数据并覆盖源数据集。POST请求主体的内容将保存到一个临时文件中,该文件将用作工作区的读取器数据集。如果工作区中有多个读卡器,则需要指明哪个读卡器将使用临时文件。您可以通过编辑服务注册来指示在发布工作区时的选择。

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:///fmedatadownload公司/Test/Viewer.fmw?opt_geturl=http://data.vancouver.ca/download/kml/elementary_school_boundaries.kmz

响应元素

如果响应格式指定为XML或JSON,则服务响应可能包含下表所示的元素:

Element

Child Elements

价值

说明

地位Info

message

消息字符串

service failure message

地位

成功|失败

服务状态

模式

同步|异步

服务模式

fmeTransformationResult格式

fmeServerResponse

FME Server response properties

FME Server response

fmeEngineResponse

FME Engine response properties

FME Engine response

email

none

电子邮件地址

Requesters’ e-mail addresses

网址

none

URL string

URL used to download the result dataset (ZIP)

作业ID

none

作业ID

The current job identifier

启用电子邮件通知

数据下载服务可以发送电子邮件,在作业成功或不成功完成时通知您。如果作业成功完成,电子邮件将提供可单击的链接或zip文件来下载数据。

有关详细信息,请参阅Configuring FME Server to Send E-mail Notifications.

See Also