If atom-entry-empty.xml is an empty file (i.e. touch atom-entry-empty.xml to create it) and I try to feed it into CollectionAPI.post like this...
curl -s --insecure --data-binary @scripts/api/data-deposit/data/atom-entry-empty.xml -H 'Content-Type: application/atom+xml' https://pete:pete@localhost:8181/dvn/api/data-deposit/v1/swordv2/collection/dataverse/peteTop
... I get the exception below. Perhaps a try/catch could be added?
Here's the relevant line: https://github.com/swordapp/JavaServer2.0/blob/sword2-server-1.0/src/main/java/org/swordapp/server/SwordAPIEndpoint.java#L355
StandardWrapperValve[edu.harvard.iq.dataverse.api.datadeposit.SWORDv2CollectionServlet]: Servlet.service() for servlet edu.harvard.iq.dataverse.api.datadeposit.SWORDv2CollectionServlet threw exception
org.apache.abdera.parser.ParseException: java.lang.ArrayIndexOutOfBoundsException
at org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:128)
at org.apache.abdera.util.AbstractParser.parse(AbstractParser.java:65)
at org.swordapp.server.SwordAPIEndpoint.addDepositPropertiesFromEntry(SwordAPIEndpoint.java:355)
at org.swordapp.server.CollectionAPI.post(CollectionAPI.java:156)
at edu.harvard.iq.dataverse.api.datadeposit.SWORDv2CollectionServlet.doPost(SWORDv2CollectionServlet.java:34)
The Java SWORD library is upstream of me but here's where I'm tracking this issue: IQSS/dataverse#893