Hi Vincent, Out-the-box DSpace only accepts submissions as configured in dspace.cfg:
plugin.named.org.dspace.sword.SWORDIngester = \ org.dspace.sword.SWORDMETSIngester = http://purl.org/net/sword-types/METSDSpaceSIP \ org.dspace.sword.SimpleFileIngester = SimpleFileIngester This means that you must submit a METS package (zip file containing files and a mets.xml manifest), this must be submitted with a MIME type as define in dspace.cfg: # A comma separated list of MIME types that SWORD will accept sword.accepts = application/zip An example package can be found in your DSpace source directory or here: http://scm.dspace.org/svn/repo/dspace/trunk/dspace-sword/example/example.zip >From the error message, it looks like you are depositing a plain PDF without >any packaging around it. DSpace could be updated to allow this - you'll need to write an ingester than knows how to accept PDFs (and probably extract basic metadata from it to populate the item's metadata). I hope that helps, Stuart Lewis Digital Development Manager Te Tumu Herenga The University of Auckland Library Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand Ph: +64 (0)9 373 7599 x81928 On 9/07/2011, at 1:50 PM, Vincent wrote: > Hi Stuart > > I ued the desktop client in > http://swordapp.org/sword-v1/sword-v1-clients-and-demonstrator-repositories/, > and I tried both simple files and packages offered in the above url, but both > return the error "415 Unsupported media error". > > The log is in the attachment. > Something I spoted is "2011-07-08 02:06:14,437 ERROR > org.dspace.sword.CollectionDepositor @ Unacceptable content type detected: > application/pdf for collection 10 > 2011-07-08 02:06:14,437 ERROR org.purl.sword.server.DepositServlet @ > org.purl.sword.base.SWORDErrorException: Unacceptable content type in deposit > request: application/pdf",but I don't think anything unusual. > > Thanks~ > > Vincent > BNU > > 2011/7/9 Stuart Lewis <s.le...@auckland.ac.nz> > Hi Vincent, > > The best option might be look in your dspace.log file, as it will likely > explain why it is unhappy with the package and consequently returning the > HTTP 415. > > What headers are you sending along with your file? I think DSpace first > looks at the headers to decide if it will accept the package, before looking > at the package itself to ensure that it matches the headers that described it. > > Thanks, > > > Stuart > > > On 8/07/2011, at 8:17 PM, Neil Taylor [nst] wrote: > > > Dear Vincent, > > > > It is a little while since I was involved with this project, but looking at > > the error message I think it is something that is returned from the > > repository. If so, then I am cc'ing this to the development list so that > > the people that worked on the DSpace sword plug-in might be able to offer > > some help. > > > > The error message states that the type of package is 'text', which might be > > a little strange if you are submitting a ZIP file. > > > > Have you been able to submit any of the test packages available from the > > swordapp.org website? This might help you to see which types of packages > > have been tested. > > > > http://swordapp.org/sword-v1/sword-v1-clients-and-demonstrator-repositories/ > > > > Regards, > > > > Neil > > > > On 7 Jul 2011, at 14:07, Vincent wrote: > > > >> Hi Neil > >> > >> I am currently working on something about SWORD, and I find the sword > >> demonstration client written by you. It is a very good one, well > >> organized. But somehow I can not use it to deposit to the Dspace I > >> installed on my pc. The error message shows that "code:415, Unsupported > >> Media Type"(see the attachment). This indicates something wrong with the > >> server accepting the file, but I can deposit it to my Dspace if I use the > >> browser to login and deposit. > >> > >> I don't know whether you have met across this kind of problem before. > >> Could you offer some help? > >> > >> Besides, what kind of file is OK for deposit, you know, the METS package > >> in a .zip file or normal zip file will do? I doubt this maybe one of the > >> reasons, although I tried one METS package without success. > >> > >> > >> Thanks~ > >> > >> Vincent > >> BNU > >> > >> > >> > >> -- > >> Best wishes~ > >> <1.bmp> > > > > -- > > Neil Taylor > > 01970 621528 - n...@aber.ac.uk - http://users.aber.ac.uk/nst/ > > > > Department of Computer Science / Adran Gyfrifiadureg > > Aberystwyth University / Prifysgol Aberystwyth > > Aberystwyth, Ceredigion, SY23 3DB > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > All of the data generated in your IT infrastructure is seriously valuable. > > Why? It contains a definitive record of application performance, security > > threats, fraudulent activity, and more. Splunk takes this data and makes > > sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________ > > sword-app-tech mailing list > > sword-app-tech@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/sword-app-tech > > Stuart Lewis > Digital Development Manager > Te Tumu Herenga The University of Auckland Library > Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand > Ph: +64 (0)9 373 7599 x81928 > > > > > -- > Best wishes~ > <dspace.log.2011-07-08> ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ sword-app-tech mailing list sword-app-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sword-app-tech