You are here: Reference Manual > FME Server Web Services > Utility Services > Data Upload Service > Examples

Examples

Example 1

Queries all files that have been uploaded under Samples/austinWFS.fmw, but does not extract any archives or inspect beneath them.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw?opt_extractarchive=false

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path />

<folder>

<name />

</folder>

<archive>

<size>3826063</size>

<name>bcalberta.zip</name>

</archive>

<archive>

<size>17337905</size>

<name>Desktop2.zip</name>

</archive>

<archive>

<size>294731</size>

<name>parcel_M26.zip</name>

</archive>

<archive>

<size>1374228</size>

<name>pipes.zip</name>

</archive>

<file>

<size>21684</size>

<name>csv2shape.fmw</name>

</file>

<file>

<size>53</size>

<name>SDS.csv</name>

</file>

<file>

<size>231279</size>

<name>helmethair.png</name>

</file>

</files>

</serviceResponse>

Example 2

Queries all files uploaded under Samples/austinWFS.fmw and, in addition to this, extracts any archive files that were present.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw?opt_extractarchive=true

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path />

<folder>

<name />

</folder>

<file>

<size>21684</size>

<name>csv2shape.fmw</name>

</file>

<file>

<size>53</size>

<name>SDS.csv</name>

</file>

<file>

<size>231279</size>

<name>helmethair.png</name>

</file>

<archive>

<name>bcalberta.zip</name>

</archive>

<archive>

<name>Desktop2.zip</name>

</archive>

<archive>

<name>parcel_M26.zip</name>

</archive>

<archive>

<name>pipes.zip</name>

</archive>

</files>

</serviceResponse>

Example 3

Retrieves the names and full paths of all files uploaded to Samples/austinWFS.fmw, including any archive files and archive file contents to three levels deep.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw?opt_extractarchive=true&opt_path
level=3&opt_fullpath=true

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path />

<folder>

<name />

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245/</path>

</folder>

<file>

<size>70013</size>

<name>bcalberta.zip/bcalberta/AEROFACP.ffs</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245

/__fmearch_name_bcalberta.zip/bcalberta/AEROFACP.ffs</path>

</file>
    <file>

<size>1010226</size>

<name>bcalberta.zip/bcalberta/COASTL.ffs</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245

/__fmearch_name_bcalberta.zip/bcalberta/COASTL.ffs</path>

</file>

<file>

<size>578807</size>

<name>bcalberta.zip/bcalberta/INWATERA.fsi</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245

/__fmearch_name_bcalberta.zip/bcalberta/INWATERA.fsi</path>

</file>

<archive>

<name>bcalberta.zip</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245

/__fmearch_name_bcalberta.zip</path>

</archive>

<folder>

<name>bcalberta.zip/bcalberta</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245

/__fmearch_name_bcalberta.zip/bcalberta</path>

</folder>

</files>

</serviceResponse>

Example 4

Queries all files within the uploaded file titled bcalberta.zip at Samples/austinWFS.fmw three levels deeper, including any nested archive files within that archive. Any of these nested archives are also extracted.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw/bcalberta.zip?opt_extractarchive=true&opt_pathlevel=3

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path>/bcalberta.zip</path>

<folder>

<name />

</folder>

<file>

<size>70013</size>

<name>bcalberta/AEROFACP.ffs</name>

</file>

<file>

<size>1010226</size>

<name>bcalberta/COASTL.ffs</name>

</file>

<file>

<size>578807</size>

<name>bcalberta/INWATERA.fsi</name>

</file>

<folder>

<name>bcalberta</name>

</folder>

</files>

</serviceResponse>

Example 5

Retrieves the names and full paths of all uploaded files at Samples/austinWFS.fmw including any previously extracted files and folders to three levels deep.
It does not extract any archives it encounters, so the term three levels deep becomes meaningful only when a request was made previously to extract any associated archives.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw?opt_extractarchive=false&opt_pathlevel=3&opt_fullpath=true

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path />

<folder>

<name />

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245/</path>

</folder>

<archive>

<name>bcalberta.zip</name>

<path>$(FME_DATA_REPOSITORY)/Samples/austin.fmw/AB4F3D23F97885FBD23A32E245/bcalberta.zip</path>

</archive>

</files>

</serviceResponse>

Example 6

Queries all uploaded files at Samples/austinWFS.fmw including any previously extracted files and folders to three levels deep.
No encountered archives are extracted, so the term three levels deep only becomes meaningful when a request was made previously to extract any associated archives.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw?opt_extractarchive=false&opt_pathlevel=3

Response

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

<serviceResponse>

<statusInfo>

<status>success</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

<files>

<path />

<folder>

<name />

</folder>

<archive>

<size>3826063</size>

<name>bcalberta.zip</name>

</archive>

<archive>

<size>17337905</size>

<name>Desktop2.zip</name>

</archive>

<archive>

<size>294731</size>

<name>parcel_M26.zip</name>

</archive>

<archive>

<size>1374228</size>

<name>pipes.zip</name>

</archive>

<file>

<size>21684</size>

<name>csv2shape.fmw</name>

</file>

<file>

<size>53</size>

<name>SDS.csv</name>

</file>

<file>

<size>231279</size>

<name>helmethair.png</name>

</file>

</files>

</serviceResponse>

Example 7

Attempts to query the contents of the bcalberta.zip file at Samples/austinWFS.fmw, but fails. The failure is based on the presumption that the bcalberta.zip archive file wasn't previously extracted and that the optional parameter specifies not to extract any archives in this request either.

Request

http://localhost/fmedataupload/Samples/austinWFS.fmw/bcalberta.zip?opt_extractarchive=false

Response

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

<serviceResponse>

<statusInfo>

<status>failure</status>

</statusInfo>

<session>2748D67C99FC2EDBA2160B0215339226</session>

</serviceResponse>