Hi Jose,

I found something:
in

--data-binary "/l1/dspace/build/dev-jhove/dspace-sword/example/example.zip"
I think that must be:
--data-binary "@/l1/dspace/build/dev-jhove/dspace-sword/example/example.zip"

in curl we use @ to indicate that it's a file.

Hope that help,



Al 18/06/2010 08:34, En/na "Oriol Olivé Comadira. Biblioteca UdG" ha escrit:
Hi Blanco, Jose,

you must see dspace logs for this. It could be any character like <> or others that must be escaped, or one metadata field that is not present in your metadata schema.

Best,

Al 17/06/2010 21:45, En/na Blanco, Jose ha escrit:
Stuwart:  I tried what you suggested, and I'm getting this error, any ideas?  
Thank you!

[dsp...@pocarisweat config]$ curl -i --data-binary "/l1/dspace/build/dev-jhove/dspace-sword/example/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://blancoj.dev.deepblue.lib.umich.edu/sword/deposit/TEMP-BOGUS/181796  -ublan...@umich.edu
Enter host password for user 'blan...@umich.edu':
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1000
Date: Thu, 17 Jun 2010 19:41:47 GMT
Connection: close

<html><head><title>Apache Tomcat/5.5.26 - 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 se
rver encountered an internal error () that prevented it from fulfilling this request.</u></p><HR size="1" 
noshade="noshade"><h3>Apache Tomcat/5.5.26</h3></b!
  ody></html>[

-----Original Message-----
From: Stuart Lewis [mailto:s.le...@auckland.ac.nz]
Sent: Friday, May 28, 2010 3:36 PM
To: Blanco, Jose
Cc:dspace-tech@lists.sourceforge.net
Subject: Re: sword and authentication

Hi Jose,

Deposit URLS (assuming you are depositing an item into a collection) are in the 
form of:

/sword/deposit/handle-id/collection

e.g.

/sword/deposit/5678/123

If you try to request that URL in a browser (HTTP verb = GET) then you will get 
a HTTP 501 response with the error message you are seeing, as SWORD only 
accepts POSTs to that URL. THerefore you can't interact with that page by 
requesting it n a browser.

To prepare the data you'll need to create suitable packages. The following blog 
post explains how this is achieved in PHP for the Facebook SWORD client:

  
-http://blog.stuartlewis.com/2009/06/02/how-does-the-facebook-sword-client-actually-work/

If you want to try POSTing some files to DSpace, there are some good examples 
in:

  
-http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.6.0/dspace-sword/README.txt

Curl is a good tool for testing, e.g.:

Authorised by dspace/dspace on a Collection:

curl -i --data-binary "@dspace-sword/example/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://dspace:dsp...@localhost:8080/sword/deposit/123456789/2

I hope that helps,


Stuart Lewis
IT Innovations Analyst and Developer
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 29/05/2010, at 6:53 AM, Blanco, Jose wrote:

Stuart:

I was able to get pass the auth.  I'm working in my dev area and I'm trying to 
now use deposit to see how it would work but when I try a /deposit/handle url I 
get this message a 501 error with this message:

The server does not support the functionality needed to fulfill this request ().

If I do the /servicedocument I get an xml page telling me what collections I 
can deposit in, but when I try to deposit I get this error message.  What url 
would I need to deposit into a collection and how do I prepare the data.

-----Original Message-----
From: Stuart Lewis [mailto:s.le...@auckland.ac.nz]
Sent: Wednesday, May 19, 2010 5:24 PM
To: Blanco, Jose
Cc:dspace-tech@lists.sourceforge.net
Subject: RE: sword and authentication

Hi Jose,

The current SWORD specification only supports HTTP basic authentication. DSpace 
will take the credentials passed this way and make use of the normal 
authentication method to authentcate the user.

Authentcation is required as the service document that is returned is 
customised for the user based on their authorizations in the system (e.g. which 
collections they can deposit into).

The problem you will have is that CoSign is designed to be used by end users 
(people), whereas SWORD authentcation is used by SWORD clients. The client may 
be used by people too, but there is no way to proxy the CoSign authentication 
through the SWORD client.

(This is where oAuth might be suported in future versions of the SWORD protocol 
to support this use case).

One option you could have is to use a single eperson account for all deposits, 
and perform authentication at your client. Your client would verify the 
identity of user (using CoSign?), and then make the deposit using a single set 
of credentials. To enable this you will need to make a second copy of 
dspace.cfg, and change the authentciation plugin settings to use another system 
such as LDAP or the in-built password system. Configure SWORD's web.xml to use 
that new copy of dspace.cfg instead.

This old blog post explains it slighty:

-http://blog.stuartlewis.com/2008/05/27/shibboleth-sword-and-dspace-15/

We use SWORD quite a lot here in Auckland, and we are about to move to using 
Shibboleth for our DSpace authentication. I'll try and write up the 
configuration changes required to enable this when we make the change, and we 
currently use the 'authentcate in the SWORD client and use a single deposit 
account' model. This has the added advantage that for users who only ever 
deposit a single item (e.g. a thesis) then we don't have thousands of accounts 
left in DSpace that never get used again.

Thanks,


Stuart

________________________________________
From: Blanco, Jose [blan...@umich.edu]
Sent: Thursday, 20 May 2010 8:45 a.m.
To:dspace-tech@lists.sourceforge.net
Subject: [Dspace-tech] sword and authentication

I'm trying to use sword and I'm a bit confused about how to setup the 
authentication. If I configure the web.xml file to use None then the following 
sword/servicedocument url is blank.  From looking at the log file it seems like 
I need to have some sort of authentication.  What is meant by basic 
authentication?  Where would the userid/passwords be kept.  We have customized 
our dspace instance  to use cosign, is this what I need to do to use sword?  
For now it would be good to just get something going so I can see how it works. 
 I'm working on a test environment.

Thank you!
Jose

------------------------------------------------------------------------------

_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

--
Oriol Olivé Comadira
*Biblioteca Universitat de Girona*
/Projectes/
DUGi: Repositori Digital de la Universitat de Girona <http://dugi.udg.edu>
DUGiDoc: Repositori Digital de Documents de la Universitat de Girona <http://dugi-doc.udg.edu> DUGiMedia: Repositori Digital d'Àudio i Vídeo de la Universitat de Girona <http://diobma.udg.edu> DUGiFonsEspecials: Repositori dels Fons Especials de la Biblioteca de la Universitat de Girona <http://dugifonsespecials.udg.edu>


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo


_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

--
Oriol Olivé Comadira
*Biblioteca Universitat de Girona*
/Projectes/
DUGi: Repositori Digital de la Universitat de Girona <http://dugi.udg.edu>
DUGiDoc: Repositori Digital de Documents de la Universitat de Girona <http://dugi-doc.udg.edu> DUGiMedia: Repositori Digital d'Àudio i Vídeo de la Universitat de Girona <http://diobma.udg.edu> DUGiFonsEspecials: Repositori dels Fons Especials de la Biblioteca de la Universitat de Girona <http://dugifonsespecials.udg.edu>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to