I've run some tests of the SWORD module using the example zip package
(example.zip) included with the source of DSpace.
But I can not intruduce files or a new item into my Dspace 1.5.2
using command line, that's what I wrote :
curl -i http://user:p...@localhost:8080/sword/servicedocument HTTP/1.1
200 OK Server: Apache-Coyote/1.1 Content-Type:
application/atomsvc+xml;charset=UTF-8 Transfer-Encoding: chunked Date:
Wed, 15 Jul 2009 11:22:54 GMT <?xml version="1.0" encoding="UTF-8"?>
<app:service xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app"
xmlns:sword="http://purl.org/net/sword/"
xmlns:dcterms="http://purl.org/dc/terms/">
<sword:version>1.3</sword:version>
<sword:verbose>true</sword:verbose>
<sword:noOp>true</sword:noOp>
<sword:maxUploadSize>-1</sword:maxUploadSize>
<app:workspace>
<atom:title
type="text">DSpace152</atom:title>
<app:collection
href="http://localhost:8080/sword/deposit/123456789/3">
<atom:title
type="text">collection prova2</atom:title>
<app:accept>application/zip</app:accept>
<sword:acceptPackaging
q="1.0">http://purl.org/net/sword-types/METSDSpaceSIP</sword:acceptPackaging>
<sword:collectionPolicy>jty</sword:collectionPolicy>
<dcterms:abstract>jyt</dcterms:abstract>
<sword:mediation>true</sword:mediation>
</app:collection>
</app:workspace>
</app:service>
Trying to add a pdf in a existing DSpace item : ( seems to work fine,
but when I'm checking it, the new file doesn't appear )
curl -i --data-binary "/home/jcaparros/example/pdf1.pdf" -H
"Content-Disposition: filename=somepdf.pdf" -H "Content-Type:
application/pdf" -H "X-No-Op: true" -H "X-Verbose: true"
http://user:p...@localhost:8080/sword/deposit/123456789/4
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Location:
http://localhost:8080/sword/media-link/123456789/4/bitstream/19
Content-Type:
application/atom+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 15 Jul 2009 11:48:52 GMT
<?xml version="1.0"
encoding="UTF-8"?>
<atom:entry
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sword="http://purl.org/net/sword/">
<atom:id>http://localhost:8080/jspui/</atom:id>
<atom:author>
<atom:name>dspace</atom:name>
</atom:author>
<atom:generator
uri="http://www.dspace.org/ns/sword/1.3.1" version="1.3"/>
<atom:rights
type="text">http://localhost:8080/jspui//bitstream/123456789/4/2/license.txt
</atom:rights>
<atom:title
type="text">somepdf.pdf</atom:title>
<sword:treatment>The file has
been attached to the specified item</sword:treatment>
<sword:verboseDescription>[2009-07-15 07:48:51.414]
Initialising verbose deposit; [2009-07-15 07:48:51.501] Performing
deposit using location:
http://localhost:8080/sword/deposit/123456789/4;
[2009-07-15 07:48:51.502] Location resolves to item with handle:
123456789/4; [2009-07-15 07:48:51.549] User is authorised to submit
to collection; [2009-07-15 07:48:51.549] Authenticated user: dspace;
[2009-07-15 07:48:51.550] Initialising depositor for a Bitstream in
an Item; [2009-07-15 07:48:51.605] DSpace will store an original copy
of the deposit file, as well as attaching it to the item; [2009-07-15
07:48:51.611] Loaded ingester: org.dspace.sword.SimpleFileIngester;
[2009-07-15 07:48:51.711] File created in item with filename
somepdf.pdf; [2009-07-15 07:48:51.719] Archive ingest completed
successfully; [2009-07-15 07:48:51.782] Original package stored as
somepdf.pdf, in item bundle org.dspace.content.bun...@17535b6;
[2009-07-15 07:48:51.812] Initialising ATOM entry generator for a
Bitstream; [2009-07-15 07:48:51.832] Removing temporary files from
disk; [2009-07-15 07:48:51.832] Database changes aborted; [2009-07-15
07:48:51.833] NoOp Requested: Removed all traces of submission;
[2009-07-15 07:48:51.834] Total time for deposit processing: 420 ms;
</sword:verboseDescription>
<sword:noOp>true</sword:noOp>
<sword:userAgent>curl/7.15.5
(i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3
libidn/0.6.5</sword:userAgent>
<sword:packaging/>
</atom:entry>
Reading the zip file to add a new item : ( Something is wrong and the
log files say 2009-07-15 08:36:02,498 ERROR
org.purl.sword.server.DepositServlet @
org.purl.sword.base.SWORDErrorException: Unacceptable content type in
deposit request: application/zip )
curl -i --data-binary "/home/jcaparros/exemple/example.zip" -H
"Content-Disposition: filename=myDSpaceMETSItem.zip" -H "Content-Type:
application/zip" -H "X-Packaging:
http://purl.org/net/sword-types/METSDSpaceSIP" -H "X-No-Op: false" -H
"X-Verbose: true" http://user:p...@localhost:8080/sword/deposit/123456789/3
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1000
Date: Wed, 15 Jul 2009 13:05:45 GMT
Connection: close
<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this
request.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
Anyone can see what's wrong? How can I make that ingestion right?
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech