You are here: Reference Manual > FME Server Services > Transformation Services > Data Download Service > Examples

Examples

Example 1

显示具有两个已发布参数的数据下载服务请求,并将XML指定为响应格式。

要求

http://localhost/fmedatadownload/Samples/austinDownload.fmw?

THEMES=airports&FORMAT_GENERIC=SHAPE&opt_responseformat=xml

回复

<?XML Version =“1.0”编码=“ISO-8859-1”?>

success

sync

<! - 服务返回 - >

...

...

< / fmeTransformationResult >

http://localhost/fmedatodownloadResults/fme_3368_1245953681697_3368871561115.zip

52

Example 2

A Data Download service request with one published parameter, one TM directive and specifying JSON as response format.

要求

http://localhost/fmedatadowload/samples/austindownload.fmw?主题= airports&tm_priority = 50&opt_responseformat = json

回复

{"serviceResponse": {

“fmotransformationResult”:{

"fmeEngineResponse": {

...

},

" fmeServerResponse ": {

...

},

"jobID": 8,

“statusinfo”:{

"mode": "sync",

“状态”:“成功”

},

"url": "http://localhost/fmedatadownloadresults/FME_5516_1258064613849_5516859449883.zip"

}}

Example 3

A Data Download service request that specifies a requester’s e-mail address, service mode as async, and XML as the response format.

要求

http://localhost/fmedatadownload/Samples/austinDownload.fmw?opt_servicemode=async&opt_requesteremail=joe@safe.com&opt_responseformat=xml

回复

async

success

<电子邮件> someene@亚搏在线safe.com

9

Example 4

Using the opt_showResult parameter set to false.

要求

http://localhost/fmedatadowload/samples/austinapartments.fmw?opt_showresult = false&opt_responseformat = XML

回复

sync

success

119http://localhost/fmedatadownload/results/FME_7D150E1F_1317227595851_7460.zip

Example 5

Using the opt_showResult parameter set to true.

要求

http://localhost/fmedatadownload/Samples/austinApartments.fmw?opt_showresult=true&opt_responseformat=json

回复

{"serviceResponse": {

“statusinfo”:{

"mode": "sync",

“状态”:“成功”

},

“fmotransformationResult”:{

" fmeServerResponse ": {

"id": "120",

"jobStatus": "SUCCESS",

},

"fmeEngineResponse": {

"statusNumber": "0",

“statusmessage”:“翻译成功”,

}

},

“乔迪”:120,

"url": "http://localhost/fmedatadownload/results/FME_7D150E1F_1317227687127_7460.zip"

}}

Example 6

Specifying the Notification Service topic to notify when a job succeeds or fails, respectively.

http://localhost/fmedatadownload/Samples/austinApartments.fmw?&nm_jobsuccess_topic=DATADOWNLOAD_ASYNC_JOB_SUCCESS&nm_jobfailure_topic=DATADOWNLOAD_ASYNC_JOB_FAILURE

Example 7

This example schedules a data download request to run at a specified time. It includes a requester email address and a number of published parameters.

http://localhost/fmedatadownload/Samples/austinDownload.fmw?THEMES=airports%20cenart&COORDSYS=LL84&FORMAT_GENERIC=SHAPE&MINX=-100&MINY=25&MAXX=-90&MAXY=35&BBOX_COORDSYS=LL84&opt_showresult=false&opt_servicemode=schedule&opt_requesteremail=joe@safe.com&trigger=runonce&start=2013-02-15 16:45:00&category=schedcat&name=schedname&description=myscheduledrequest

See Also