Hi Guys,

It looks like you are making progress.  Just to add that the existing
SWORDv2 implementation in DSpace is pretty experimental, but I have
been working through it in the last couple of weeks, finding and
fixing all the oddities that I can find.  This is all happening in a
fork I have made of the github repo, from the 1.8.2 release:

https://github.com/nye-duo/DSpace/tree/duo

I hope to have this stable in the next couple of weeks, but note that
I'm not currently trying to get the multipart issues resolved, just
all the other bits and bobs.

Cheers,

Richard

On 30 April 2012 09:09, LEWIS Stuart <stuart.le...@ed.ac.uk> wrote:
> Hi Hayden,
>
> The two options would be either:
>
> PackagerMetsSwap::create (to create a METS/SWAP package, which can be used in 
> SWORD v1 or v2), followed by SWORDAppClient::deposit to deposit the package
>
> Or
>
> SWORDAppClient::depositAtomEntry to create the metadata-only object, followed 
> by SWORDAppClient::addExtraFileToMediaResource
>
> (I think that should work - I've not got a computer set up with this code 
> running right now).
>
> Thanks,
>
>
> Stuart
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> -----Original Message-----
> From: Hayden Young [mailto:haydenyo...@wijiti.com]
> Sent: 30 April 2012 08:55
> To: LEWIS Stuart
> Cc: sword-app-tech@lists.sourceforge.net
> Subject: Re: [sword-app-tech] depositMultipart always results in a 500 error
>
> Hi Stuart
>
> Thanks for your assistance.
>
> So if I need to use a two step process to deposit an item to DSpace, am I 
> using the correct methods to overcome DSpace's SWORDv2 limitations?
>
> I.e.
>
> SWORDAppClient::deposit to create the item
>
> SWORDAppClient::replaceMetadata or
> SWORDAppClient::replaceMetadataWithFile to update the item's metadata.
>
>
>
> On 30/04/12 15:32, LEWIS Stuart wrote:
>> Hi Hayden,
>>
>> ===
>> Okay I've tried a couple of methods for adding metadata and completing the 
>> deposit.
>>
>> Both:
>>
>> $response =
>> $client->replaceMetadata((string)$response->sac_edit_media_iri,
>> self::USERNAME, self::PASSWORD, self::USERNAME, './tmp/atom2', false);
>>
>> $response =
>> $client->replaceMetadataAndFile((string)$response->sac_edit_media_iri,
>> self::USERNAME, self::PASSWORD, self::USERNAME, 
>> './tmp/atom_multipart_package2.zip', false);
>>
>> result in the error:
>>
>> <atom:summary xmlns:atom="http://www.w3.org/2005/Atom";>Filename could not be 
>> extracted from
>> Content-Disposition</atom:summary><sword:verboseDescription>org.swordapp.server.SwordError:
>> Filename could not be extracted from Content-Disposition
>>
>> Looking at both these methods shows that they call depositAtomEntryByMethod 
>> and depositMultipartByMethod but from what I can see, neither of these 
>> methods sets the curl Content-Disposition header. Could this be what is 
>> causing this error?
>> ===
>>
>> I don't think that is what should be causing it - when replacing metadata 
>> (the first case, depositing a new atom entry) no filename 
>> (content-disposition) is required.  See the example in the spec at "6.5.2. 
>> Replacing the Metadata of a Resource".
>>
>> In the second case, the problem might be that you're trying to deposit a 
>> package (zip file, SWORD v1-style, which requires the use of the deposit() 
>> function) using the depositMultipartByMethod function.  This requires a 
>> multipart file, which can be created using the packager_atom_multipart.php 
>> class.  For an example of this in use, see 
>> test/test-packager-atom_multipart.php
>>
>> Thanks,
>>
>>
>> Stuart
>>
>
> --
> Hayden Young
> Managing Director
> Wijiti Pty Ltd
> p. +61 (0) 08 6398 5010
> e. haydenyo...@wijiti.com
> w. www.wijiti.com
> vcard. www.wijiti.com/vcard/haydenyoung.vcf
>
> NOTICE
> This e-mail and any attachments are intended for the addressee(s) only and 
> may be confidential. They may contain legally privileged or copyright 
> material. You should not read, copy, use or disclose them without 
> authorization. If you are not the intended recipient please contact the 
> sender as soon as possible by return e-mail and then please delete both 
> messages. This notice should not be removed.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> sword-app-tech mailing list
> sword-app-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sword-app-tech



-- 

Richard Jones,

Founder, Cottage Labs
t: @richard_d_jones, @cottagelabs
w: http://cottagelabs.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

Reply via email to