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

Reply via email to