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

Examples

Example 1

Shows a Data Download service request with two published parameters and specifying XML as response format.

Request

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

THEMES=airports&FORMAT_GENERIC=SHAPE&opt_responseformat=xml

Response

<?xml version="1.0" encoding="ISO-8859-1" ?>

<serviceResponse>

 

<!-- Service Status Info -->

<statusInfo>

<status>success</status>

<mode>sync</mode>

</statusInfo>

 

<!-- Service Return -->

<fmeTransformationResult>

<fmeEngineResponse>...</fmeEngineResponse>

<fmeServerResponse>...</fmeServerResponse>

</fmeTransformationResult>

 

<url>http://localhost/fmedatadownloadresults/FME_3368_1245953381697_3368871561115.zip</url>

<jobID>52</jobID>

</serviceResponse>

Example 2

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

Request

http://localhost/fmedatadownload/Samples/austinDownload.fmw?THEMES=airports&tm_priority=50&opt_responseformat=json

Response

{"serviceResponse": {

"fmeTransformationResult": {

"fmeEngineResponse": {

...

},

"fmeServerResponse": {

...

},

"jobID": 8,

"statusInfo": {

"mode": "sync",

"status": "success"

},

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

Request

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

Response

<?xml version="1.0" encoding="ISO-8859-1"?>

<serviceResponse>

<statusInfo>

<mode>async</mode>

<status>success</status>

</statusInfo>

<email>someone@safe.com</email>

<jobID>9</jobID>

</serviceResponse>

Example 4

Using the opt_showResult parameter set to false.

Request

http://localhost/fmedatadownload/Samples/austinApartments.fmw?opt_showresult=false&opt_responseformat=xml

Response

<?xmlversion="1.0"encoding="UTF-8"?>

<serviceResponse>

<statusInfo>

<mode>sync</mode>

<status>success</status>

</statusInfo>

<jobID>119</jobID><url>http://localhost/fmedatadownload/results/FME_7D150E1F_1317227595851_7460.zip

</url>

</serviceResponse>

Example 5

Using the opt_showResult parameter set to true.

Request

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

Response

{"serviceResponse": {

"statusInfo": {

"mode": "sync",

"status": "success"

},

"fmeTransformationResult": {

"fmeServerResponse": {

"id": "120",

"jobStatus": "SUCCESS",

},

"fmeEngineResponse": {

"statusNumber": "0",

"statusMessage": "Translation Successful",

}

},

"jobID": 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