You are here: 参考手册 > FME Server 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_geturl. The URL to a dataset The URL of the source dataset to be used for transformation
opt_showresult 真实|假 Whether the XML/JSON responses include the FME transformation result. The default value is true if this parameter is not present.
opt_servicemode 同步|异步| schedule

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

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.

opt_requesteremail. comma-separated e-mail addresses 发送通知电子邮件的地址。

通知经理支持

这项服务支持Notification Manager Directives.

安排数据下载请求

UsingOpt_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.

在请求期间使用远程数据

使用HTTP Post Body的数据作为读者数据集

此Web服务可以通过HTTP POST接收数据和覆盖源数据集。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服务器响应属性

FME Server response

fmeengineResponse.

FME Engine response properties

FME Engine response

email

没有

电子邮件地址

Requesters’ e-mail addresses

URL.

没有

URL string

URL used to download the result dataset (ZIP)

乔迪

没有

招聘ID.

The current job identifier

启用电子邮件通知

数据下载服务可以发送电子邮件,以便在作业成功或未生物时向您通知您。如果作业成功完成,则电子邮件提供可点击的链接或ZIP文件以下载数据。

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

See Also