Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-199

SWORD module doesn't accept X-No-Op header (dry run)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.6.0
    • Component/s: SWORD
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      5

      Description

      I've run some tests of the SWORD module using the example zip package (example.zip) included with the source of DSpace.

      The creation of a new resource fails if the HTTP request contains the X-No-Op header with a value of 'true'. According to the SWORD Atom profile 1.3 "servers MUST recognise this header and either handle the POST as a simulated deposit without creating a resource, or else return a status code of 400 Bad Request to indicate that they do not support this extension". What happens is that the server returns a status code of 500 Internal Server Error.

      This is the stack trace included in the server reponse:

      Server returned: value: org.purl.sword.client.SWORDClientException: Unable to parse the XML(java.lang.NullPointerException
      org.dspace.sword.CollectionDepositor.undoDeposit(CollectionDepositor.java:287)
      org.dspace.sword.DepositManager.deposit(DepositManager.java:212)
      org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:150)
      org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:331)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      )

      All works fine if the request doesn't contain the X-No-Op header, or if this header has a value of 'false'.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ratrace Claudio Venturini
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: