Hi,

I've been having some trouble with multipart POST on deposits to the
swordv2 server deployed as part of the DSpace 3.1 release (from the git tag
in source). When I post my ATOM xml and binary zip to the server, I get the
following error:

[status code] 400
[reason phrase] Bad Request
[url] http://demo.dspace.org/swordv2/collection/10673/2

Coming from the following SwordError:

<?xml version="1.0" encoding="ISO-8859-1"?>
<sword:error href="http://purl.org/net/sword/error/ErrorBadRequest";
xmlns:sword="http://purl.org/net/swor>d/terms/"><atom:title
xmlns:atom="http://www.w3.org/2005/Atom"/><atom:updated
xmlns:atom="http:/>/www.w3.org/2005/Atom">2013-05-15T15:02:03Z</atom:updated><atom:generator
uri="http://www.dspace>.org/ns/sword/2.0/" version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom";>dspaced...@gmail.com</atom:>generator><sword:treatment>Processing
failed</sword:treatment><atom:summary
xmlns:atom="ht>tp://www.w3.org/2005/Atom">Filename could not be
extracted from 
Content-Disposition</atom:summary>&>lt;sword:verboseDescription>org.swordapp.server.SwordError:
Filename could not be extracted from Content->Disposition

However, the file-name is plainly available in the Content-disposition
header. I read the following post on the sword-app-tech mailing list
speaking to what looks like a similar problem, involving multipart post and
mets:

http://www.mail-archive.com/sword-app-tech@lists.sourceforge.net/msg00091.html

I don't see any error messages related to mets or ingestors on the server
side.

I'm using the Guzzle library as I ran into an XML parsing issue on the
service document with Stuart's swordv2app php library. (Same issue
described here:
http://www.mail-archive.com/sword-app-tech@lists.sourceforge.net/msg00296.html
)

Any advice you guys might have would be great! I'm going to try and do a 2
part commit, as suggested by Stuart Lewis in first email exchange
referenced above.

Finally, here's my POST HEADERS and Atom XML content (binary ommitted) from
tcpdump along with the start of the Zip attachment:

POST /swordv2/collection/10673/2 HTTP/1.1
Host: demo.dspace.org
User-Agent: Guzzle/3.4.3 curl/7.24.0 PHP/5.4.15
Authorization: Basic ZHNwYWNlZGVtbytzdWJtaXRAZ21haWwuY29tOmRzcGFjZQ==
In-Progress: true
Expect: 100-Continue
Content-Length: 249640
Content-Type: multipart/form-data;
boundary=----------------------------50663e5aca80
------------------------------50663e5aca80
Content-Disposition: form-data; name="atom"; filename="atom1368630244.xml"
Content-Type: application/atom+xml
<?xml version="1.0"?>
<entry xmlns:atom="http://www.w3.org/2005/Atom";
xmlns:dcterms="http://purl.org/dc/terms";
xmlns:mets="http>://www.loc.gov/METS/"><title>If Sword is the
Answer</title><author><name>Stuart
L>ewis</name></author><dcterms:abstract>Purpose ... To describe the
repository deposit proto>col, Simple
            Web...service Offering Repository Deposit (SWORD),
            its development iteration, and some of its potential use cases.
            In addition, seven case studies of institutional use of
SWORD are provided.
            Approach ... The paper describes the recent development
cycle of the SWORD
            standard, with issues being identified and overcome with a
subsequent version.
            Use cases and case studies of the new standard in action
are included to
            demonstrate the wide range of practical uses of the SWORD standard.
            Implications ... SWORD has many potential use cases and
has quickly become
            the de facto standard for depositing items into
repositories. By making
            use of a widely...supported interoperable standard, tools
can be created that
            start to overcome some of the problems of gathering
content for deposit into
            institutional repositories. They can do this by changing
the submission process
            from a ...one...size...fits...all... solution, as provided
by the repositorys own user
            interface, to customised solutions for different users.
            Originality ... Many of the case studies described in this
paper are new and
            unpublished, and describe methods of creating novel
interoperable tools for
            depositing items into repositories. The description of
SWORD version 1.3 and its
            development give an insight into the processes involved
with the development of
            a new
standard.</dcterms:abstract><dcterms:available>2013</dcterms:available>&>lt;dcterms:creator>Lewis,
Stuart</dcterms:creator><dcterms:title>If Sword is the
Answer</d>cterms:title><dcterms:type>swordv2-test</dcterms:type></entry>

------------------------------50663e5aca80
Content-Disposition: form-data; name="payload";
filename="swordTemp_1368630244.zip"
Content-Type: application/zip


The PHP project is available on GitHub if anyone wants to mess around with
this simple test client (using Guzzle):

https://github.com/ecosur-infonomia/sword2-client

best wishes,

Andrew
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to