Hello Stuart, I have altered the config file for swordv2 like you have described, it was giving different errors/notices in the dspace, but thanks to your sample short testing php file, I have used it on my own zipped package, to realize its ingesting the metadata properly (maybe the config changes werent needed, I will try experiment later to move them to previous state). The reason it wasnt ingesting the document with metadata was missing header of the web request:
"In-Progress: true" i didnt have it set (it fails to ingest also with false value) I have also changed also the header for X-Packaging to Packaging, as it seems its used now even for METS. Otherwise its ingesting properly with the changes above, thanks a lot Pavel > ------------ Původní zpráva ------------ > Od: Stuart Lewis <s.le...@auckland.ac.nz> > Předmět: Re: [sword-app-tech] SwordAppV2 client with METS metadata descriptor > Datum: 29.12.2011 08:11:45 > ---------------------------------------- > Hi Pavel, > > I'm currently on holiday (so only have my mobile for connectivity - can't test > this all fully). The DSpace 1.8.x SWORDv2 support isn't fully battle-tested > yet, so there will probably be a few rough edges. > > I've got this to work now, as follows: > > Use the PHP: > > $testmetspackage = "test-files/sword-article.zip"; > $testmetstype = "http://purl.org/net/sword/package/METSDSpaceSIP"; > > print "About to deposit package file (" . $testmetspackage . ") to " . > $testdepositurl . "\n"; > if (empty($testuser)) { > print "As: anonymous\n"; > } else { > print "As: " . $testuser . "\n"; > } > $testdr = $testsac->deposit($testdepositurl, $testuser, $testpw, $testobo, > $testmetspackage, $testmetstype, $testcontenttype, true); > print "Received HTTP status code: " . $testdr->sac_status . " (" . > $testdr->sac_statusmessage . ")\n"; > if (($testdr->sac_status >= 200) || ($testdr->sac_status < 300)) { > $testdr->toString(); > } > > Add the following lines to [dspace]/config/modules/swordv2-server.cfg > > plugin.named.org.dspace.content.packager.PackageIngester = \ > org.dspace.content.packager.DSpaceMETSIngester = METS > > And in the same file, change the line: > > org.dspace.sword2.SwordMETSIngester = > http://purl.org/net/sword/package/METSDSpaceSIP, \ > > to: > > org.dspace.sword2.SwordMETSContentIngester = > http://purl.org/net/sword/package/METSDSpaceSIP, \ > > Finally, it only worked when depositing to a collection with workflow. > > Hopefully this will help us track down the rough edges that need smoothing. > > Thanks, > > > Stuart > > > > On 27/12/2011, at 10:41 PM, Pavel Mika wrote: > > > Hello, > > > > I would like to ask if there is any working example of SwordV2app client > working with mets.xml metadata (METSDSpaceSIP), I was checking the examples, > but > all use SimpleZip for package submitting, or if there is a porting guide from > V1 > to V2 METS. > > > > I have been using mets.xml with swordv1 client for zip packaged document > ingestion, the header contained X-Packaging: > http://purl.org/net/sword-types/METSDSpaceSIP . The metadata attributes were > under <mdWrap MDTYPE="MODS"> in the mets.xml file. This was working fine > with > older DSpace repository. > > > > I was trying to port the doc submitter to new DSpace (1.8.1) using swordv2 > protocol, but there seems to be some problem with the package ingestion. I am > currently using METS with zip packaging, the mets.xml is done with > MDTYPE="OTHER" OTHERMDTYPE="EPDCX" according to the PHP swordapplib example. > > > > the error message I see in the server is: > > > > Cannot find named plugin for > > interface=org.dspace.sword2.SwordContentIngester, > name="application/zip" > > > > the package content gets then submitted without metadata, the dspace then > states on the web that document was submitted without metadata. The document > title is then Untitled: + content doc filename without first letter. > > I was trying to swap the X:Packaging to Packaging, I did try also the > mentioned http://purl.org/net/sword/package/METSDSpaceSIP instead > http://purl.org/net/sword-types/METSDSpaceSIP, but as i remember, it was > always > submitting without the metadata stored within the mets.xml inside the zip > file, > with same error. In one header test case it did state this error message, > without content ingestion. > > > > > > sword2-server.cfg: > > ------------------------ > > accepts = application/zip, image/jpeg > > > > plugin.named.org.dspace.sword2.SwordContentIngester = \ > > org.dspace.sword2.SimpleZipContentIngester = > http://purl.org/net/sword/package/SimpleZip, \ > > org.dspace.sword2.SwordMETSIngester = > http://purl.org/net/sword/package/METSDSpaceSIP, \ > > org.dspace.sword2.BinaryContentIngester = > http://purl.org/net/sword/package/Binary, \ > > org.dspace.swordpackagers.SwordDocXIngester = > application/vnd.openxmlformats-officedocument.wordprocessingml.document, \ > > org.dspace.swordpackagers.SwordXifIngester = image/jpeg > > > > plugin.named.org.dspace.sword2.SwordContentDisseminator = \ > > org.dspace.sword2.SimpleZipContentDisseminator = > http://purl.org/net/sword/package/SimpleZip, \ > > org.dspace.sword2.FeedContentDisseminator = application/atom+xml, \ > > org.dspace.sword2.FeedContentDisseminator = application/atom+xml_type_feed > > > > # note that we replace ";" with "_" as ";" is not permitted in the > PluginManager names > > plugin.named.org.dspace.sword2.SwordStatementDisseminator = \ > > org.dspace.sword2.AtomStatementDisseminator = atom, \ > > org.dspace.sword2.OreStatementDisseminator = rdf, \ > > org.dspace.sword2.AtomStatementDisseminator = > > application/atom+xml_type_feed, > \ > > org.dspace.sword2.OreStatementDisseminator = application/rdf+xml > > ------------------------ > > > > Any clue where can be the problem? I am not sure if the problem is within > metadata format, additional POST http request header attribute or missing > server configuration attribute, as the application/zip package is working and > the X:Packaging header provided. > > > > thanks > > Pavel Mika > > > > > ------------------------------------------------------------------------------ > > Write once. Port to many. > > Get the SDK and tools to simplify cross-platform app development. Create > > new or port existing apps to sell to consumers worldwide. Explore the > > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > > http://p.sf.net/sfu/intel-appdev > > _______________________________________________ > > 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 > > > > ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ sword-app-tech mailing list sword-app-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sword-app-tech