From: Scott W. <sco...@gm...> - 2008-01-30 11:12:30
|
Aha... when I drag the zip file onto my app it gets recognized as "application/octet-stream" rather than "application/zip" before its sent onto the repository, which probably causes the error. S On 30 Jan 2008, at 10:55, Antony Corfield [awc] wrote: > (Copied to eprints tech and sword lists) > > Hi Sebastien, > > I tried again this morning without 'on behalf of' and it works fine > see: > > http://cakeordeath.ecs.soton.ac.uk/60/ > http://cakeordeath.ecs.soton.ac.uk/61/ > http://cakeordeath.ecs.soton.ac.uk/62/ > http://cakeordeath.ecs.soton.ac.uk/63/ > > It also works with 'on behalf of' set since you have enabled mediated > deposit. > (It would be handy if the servicedocument or the returned status > indicated this.) > > The above files (example.zip) were posted using the desktop client, > the > web client (http://sword.aber.ac.uk/sword/client) and my own client > implementation. > > It's also necessary to set fileType (MIME type) e.g. > postMessage.FileType("application/zip") assuming one's posting a zip > file. This isn't required when posting a zip file using the java SWORD > client to Dspace, maybe it's the default. > > Thanks again Sebastien, that's very useful, I can now sort out my > SWORD > eprints instance. > > Cheers, > Antony > > > -----Original Message----- > From: Sebastien Francois [mailto:sf...@ec...] > Sent: 29 January 2008 18:02 > To: Antony Corfield [awc] > Subject: Re: EPrints/SWORD - problem with METS file > > Hello Antony, > > So I have had a look at the code, and there is only one case when a > 403 > Forbidden is returned, this is when a client attempts a mediated > deposit > > (i.e. on behalf of someone else) which is not allowed... You didn't > try > a mediated deposited by any chance? Anyhow, I've enabled any mediated > deposit for now so you can try again. > > I also sent the same file from my home server and it worked too so > it's > probably not because I was on the soton.ac.uk domain. > > Good luck and let me know what happens! > Seb. > > PS: in case you're using Linux (I believe there is a Windows version > too), you can use 'curl' to send a file, without the need of the Java > clients. The command line which worked for me is (assuming you're in > the > > same directory as 'example.zip'): > > curl -v --data-binary @example.zip > http://cakeordeath.ecs.soton.ac.uk/app/deposit/buffer --user > sword:swordtest -H 'X-Format-Namespace: METS' -H 'Content-Type: > application/zip' > > Antony Corfield [awc] wrote: >> Hi Sebastien, thanks for your help.. >> >> Just tried with (example.zip) desktop client and namespace METS but > same >> error - 403. >> It wouldn't have anything to do with you being at soton.ac.uk? >> >> Cheers, >> Antony >> >> >> >> >> -----Original Message----- >> From: Sebastien Francois [mailto:sf...@ec...] >> Sent: 29 January 2008 16:28 >> To: Antony Corfield [awc]; sco...@gm... >> Cc: ja...@yo... >> Subject: EPrints/SWORD - problem with METS file >> >> Dear all, >> >> I read from the EPrints tech mailing-list that you both had problem >> using the METS/epdcx file. I developed the SWORD extension for >> EPrints > >> and I am very happy helping you with this. >> >> I've just tested to deposit the example.zip file provided on the JISC >> wiki (this one: http://www.ukoln.ac.uk/repositories/sword/ >> example.zip) > >> to cakeordeath.ecs.soton.ac.uk and I haven't had any problems with it >> (result is here: http://cakeordeath.ecs.soton.ac.uk/54/). I used the >> Java client (v1.0) and I set the namespace to 'METS'. The METS needs > to >> be 'epdcx', other METS formats (w/ MODS for instance) are not > supported >> at this stage. >> >> Could you possibly try again and let me know what error message you > get? >> >> Kind regards, >> Sebastien Francois >> >> >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > sword-app-tech mailing list > swo...@li... > https://lists.sourceforge.net/lists/listinfo/sword-app-tech |