Upload this file to your appliance and reference it from a
stylesheet action that comes after an HTTP query params action.
The var://service/mpgw/skip-backside
should be set to 1.
Use the following curl command should get you the metadata.
(line breaks are for brevity).
curl http://host:port/sp/meta
--data-urlencode entityID=urn:your:entity:id:here
--data-urlencode certname=NameOfYourCertObject
--data-urlencode acs=https://your.acs.host.com:9876/acs
> mySamlMetadata.xml
Of course, you would need a match action for /sp/meta
.