span8
span4
span8
span4
If you are already running FME Server's Data Download Service you may want to create an RSS feed of layers available for download.Users can subscribe to your RSS feed and get a current view of the data layers your organization has available.
The RSS feed can include one entry per layer and a link to download that layer with default parameters.The example below could be developed further to create entries for different formats or coordinate systems as well.
The attached workspace uses HTTPFetcher transformers to extract the capabilities of your FME Server using your FME Server's REST service.An http request to the REST service returns every workspace registered with the Data Download Service, and then another request returns all parameters and their possible values.In this example we look for parameters called THEMES which we know contain layer choices for users in the sample workspace austinDownload.fmw.If you have used another parameter name to expose the layer choices to users, the workspace can be modified to look for these other names as well.
The workspace then builds Data Download links for each layer and writes these links as entries to the GeoRSS Writer.
When the workspace is published to FME Server and registered with the Data Streaming Service, we end up with link that will return RSS with an entry for each layer as shown here.Note: The RSS feed below is displayed using Internet Explorer.Please note other web browsers may show the results differently.
1.Download the attached workspace and open in FME Workbench.
2.Change the defaults of the following published parameters to reflect your FME Server environment:
3.Run the workspace in FME Desktop to test it.You should have written an XML file to the destination dataset directory you selected.At a minimum there should be some
4.You will likely need to edit the
Testertransformer in the workspace to search for the parameter names you have used for your layer choices if you have not used the parameter names THEMES.For example, you may have used the parameter name
Layerso you would add
Layerto the Tester.
5.Make all of the published parameters private by right-clicking on each of them and selecting
Convert to Private Parameter.
6.Publish the workspace to your FME Server and register the workspace with the Data Streaming Service.
7.Use the FME Server Web User Interface to run the workspace via the Data Streaming Service.If you use the Internet Explorer web browser, you should see the entries formatted as shown in the image above after the workspace runs.You should be able to click on the links to download the layers.FME Server will do the data download using the default parameters is whichever workspace the layer is coming from.
8.The link to your RSS feed can copied from the Web UI if you click on the workspace in Data Streaming Service.The
Show Developer Informationbutton has a
Direct Url Examplewhich is the link to RSS feed.
Note on Authentication:
If your Data Streaming Service is running in a secure environment then users will need to enter credentials to see the RSS feed.Similarly, if your Data Download Service is secured then users will need to enter credentials to download a layer.
FME Server Developer Playground
403 Forbidden Error When Making FME Server Request
Send Source Data to FME Server with HTTP POST
Customizing Data Download and Job Submitter Service Results Pages
401 Unauthorized Error When Making FME Server Request
Creating REST Web Services: 4.First an RPC Web Service (2015)
Easy Translator using FME Server
Creating REST Web Services: 6.Supporting HTTP POST (2015)
© 2020 Safe Software Inc |Legal