My web colleagues have set up GeoServer and a GeoNetwork data portal website for which I am creating content.

  1. I have used FTP to upload a shapefile to GeoServer including its XML metadata file.
  2. Created a store for this dataset on GeoServer.
  3. Gone into GeoNetwork, imported metadata to create an entry in GeoNetwork.
  4. To enable the dataset to be downloaded I have added an online resource as shown below:


  1. This creates a download link on the main metadata page, which if you click on download, downloads the shapefile as a zip file.


  1. If one opens the zip file you see something like this:


There is no XML file which seems a bit crazy to me as now you have distributed a dataset without any metadata which is obviously a bad thing!

I can't work out how one ensures that the XML (which I had uploaded using FTP along with all the other files that make up a shapefile) is included. I've tried to search the GeoNetwork online help and failed to find a solution.

Does anyone know how to do this?

  • 1
    Not sure this is a GeoNetwork issue, but rather a GeoServer issue. it's geoserver that isn't giving you a metadata file when you select a shape-zip format as a GetFeature request, there isn't a parameter that you can add to the request to also get metadata.
    – nmtoken
    Commented Jul 23, 2019 at 13:44
  • Not sure if you can do it with geoserver, but in mapserver (mapserver.org/output/ogr_output.html) you can configure wfs_additional_files_in_output that would allow you to include some metadata, but otherwise I think the restriction are the ogr drivers used by the WFS software
    – nmtoken
    Commented Jul 23, 2019 at 13:51
  • Hi @nmtoken many thanks for your help. I'm rapidly becoming outside my sphere of knowledge with regards to web servers so I shall show what you suggest to the web dude who set up geoserver and see if we can solve this. It never occurred to me that it could be geoserver not playing ball. I shall report back our findings.
    – Hornbydd
    Commented Jul 23, 2019 at 13:57

1 Answer 1


You would need to modify the GeoServer Shapefile output code to achieve this. At first glance it looks like a simple change to ShapeZipOutputFormat might do it, but I suspect you would also need to make changes to make sure that the xml file was placed in the output folder to be exported would also be needed.

If you want to go down this route please checkout the GeoServer enhancement policy.

  • I believe this is the solution and worthy of the bounty but I've not worked out how to request a new feature. Following your link I see I need to go to a template page make a copy of that then go to the proposal page and "edit" it. Seems a very tedious way of doing things but more importantly I can't work out how the hell you are supposed to edit the page! I see no edit button and the instructions leave you hanging with the statement of just edit the page, but how???
    – Hornbydd
    Commented Aug 6, 2019 at 9:28
  • There is an edit button in the top right corner, but you should discuss the proposal on the devel list before making a gisp
    – Ian Turton
    Commented Aug 6, 2019 at 13:21
  • Ian can I have a quick chat in the GIS SE chat room?
    – Hornbydd
    Commented Aug 6, 2019 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.