Demo Installation in your FMEServer
Loading Source data onto PostGIS ProtectedSite
1. Set up Loaders on an author machine that can see PostGIS on the Server.
2. Unzip source data to local sister directory called 'source'
3. Unzip the workspaces_resources_v7.0. This includes a resources folder, a schema folder
4. There is one loader for each of the source datasets. Open each of the 3 Loaders (N2000, NVR, Helcom) and edit as follows: a. Set source path to source FFS data path b. Adjust PostGIS user / password, server / database name c. Adjust the paths to the schema mapper csvs and to the xmlTemplates. d. Make sure table delete / truncate is set to no on destination feature type (unless this is the first Loader running in which case it should create table by default anyways).
5. Run each of the Loaders in succession. Check that the data is loaded after each run using Viewer reading PostGIS. You may want to run the Helcom Loader first as this is the smallest dataset and runs the fastest, so if you have any problems you won't waste much time. Note that the table name is critical for the WFS - it wont run if you change it. You can test load to ProtectedSite2 or ProtectedSites, but it won't work if you dont use 'ProtectedSite'. Also note that I use the public user to write but I use no user to read, which seems to work ok.
To publish to FME Server:
1. Extract and configure InspirePAexporterOgcWfs.fmw locally first.
2. Modify the PostGIS connnection info as needed. Modify the xmlTemplate paths.
3. Test run InspirePAexporterOgcWfs.fmw. Open the output gml file with Viewer using the protectedSitesFull.xsd as the target application schema and make sure you can see the output and attributes.If you have problems check to make sure encoding is unset on the Text File writer. This is encoded in the dataset XML template and if these 2 dont agree then you may have trouble reading the GML.
4. Select File - publish to Server. Login as author.
5. Create a new repository for ProtectedAreas if not already available.
6. Deselect data source but publish all other resources including the 5 xml templates, getCapabilities_v2.0.xml and desribeFeature_v2.0.xml. Use the '+' multiple resource selection tool to do so. Note that all resources other than the source dataset will be local to the .fmw. Also make sure you publish all resources every time you republish the workspace, should you need to make any edits.
7. Select jobSubmitter, WFS for services to register with. Complete the publish wizard by clicking 'Publish'.
8. Go to the FME Server Web UI. Login as author.
9. Open the WFS - ProtectedAreas - InspirePAexporterOgcWfs.fmw configuration in the FMEServer WebUser UI.
10. Set the default bbox values (0 to 360 if you dont care) and set the WFS getCapabilites response file = getCapabilities_v2.0.xml
WFS describeFeature response file = describeFeature_v2.0.xml
11. Test this by clicking on the getCapabilities button. Click back on your browser.
12. Click on Show URL, copy to your buffer.
13. Open FME Viewer, open WFS data source and paste in the URL
14. Go to WFS reader parameters. Set application schema = ProtectedSitesFull.xsd. Note that you need the full directory of Inspire xsds locally accessible to wherever your WFS reader / FME Viewer is, not just the one ProtectedSitesFull.xsd file, since it includes a bunch of others. As far as I know, you dont need these xsds on the server but I could be wrong.
15. Select table = ps-f:ProtectedSite
16. Set extent selection - if you dont you will get the extents set when the Exporter was published. Dont try to select all the data or the server will likely crash and you will need to use the Server Admin UI to kill the job and avoid a continual job restart. You should probably set a max features on the exporter's PostGIS reader advanced settings (1000 or so).
17. Click ok and see if the Viewer can read your WFS server.
18. If you have problems test with the jobSbmitter. Also consult the logs under FMEServer\logs\ogc etc. Make sure all the required inspire xsds are included at the same location as ProtectedSitesFull.xsd. Also try reading with DataInspector.
19. Note that you shouldn't change the name of the workspace. It is hardcoded into the getCapabilities.xml. If you change it then you need to change it there as well.
20. The getCapabilities.xml also stores the repository name and the server name in the URLs for the various request responses, as follows: http://<serverName>:80/fmeogc/<repositoryName>/InspirePAexporterOgcWfs.fmw So dont forget to adjust all of these to be consistent.