Stuart, Thanks again for the excellent help. The problem with my SWORD servicedocument was a collection that didn't have a name attached to it. I added the name via SQL and the servicedocument started being created without a problem.
Also, thanks for the pointers on how to get started, particularly with a PHP option info. SWORD is looking promising, and I'm looking forward to diving in with it... Stacy -----Original Message----- From: Stuart Lewis [mailto:[email protected]] Sent: Wednesday, September 09, 2009 4:23 AM To: Pennington_Stacy Cc: [email protected] Subject: Re: [Dspace-tech] SWORD and DSpace HowTo Available? Hi Sue, > I'm testing various import options for DSpace 1.5.2, and I'm > struggling with SWORD, which seems like a great idea. I'm having > trouble accessing my SWORD servicedocument, and I'm sure that I just > didn't set something up correctly. (See the dspace.log file error > below - it results in an HTTP Status 500 error when you go to > http://dlynx.rhodes.edu/sword/servicedocument > and authenticate). > > 2009-09-08 15:40:35,885 ERROR org.apache.catalina.core.ContainerBase. > [Catalina].[localhost].[/sword].[servicedocument] @ Servlet.service > () for servlet servicedocument threw exception > java.lang.NullPointerException > at org.purl.sword.base.Collection.marshall(Collection.java:459) This occurs if you have a collection that has no title. This can occur if you use the DSpace web user interface to create a collection, but don't complete the process of creating the collection. The best fix is to make sure all your collections have a title, but I've also fixed it up for DSpace 1.6. If you want to copy the code fix into your installation, see: - http://scm.dspace.org/trac/dspace/changeset/4249/dspace/trunk/dspace-sword/dspace-sword-api > Is anyone aware of a basic DSpace and SWORD HowTo document that > would take me, more or less, step-by-step through the setup process, > if I wanted to use the SWORD demonstration client to submit items to > a DSpace collection? I'm not aware of one. The main settings you need to get correct are the content type (application/zip) the package format (http://purl.org/net/sword-types/METSDSpaceSIP ), and make sure the package is created correctly. An example package can be found in [dspace-src]/dspace-sword/example/example.zip. A PHP class (for online or offline scripting use) can be found at http://php.swordapp.org/ and this includes a class that can create (and optionally deposit) packages for you: require('packager_mets_swap.php'); // Create a new package with the root and directory of the input files, and the root and directory of the created package $package = new PackagerMetsSwap($rootin, $dirin, $rootout, $fileout); // Add metadata to the package $package->setType($test_type); $package->setTitle($title); $package->setAbstract($abstract); foreach ($creators as $creator) { $package->addCreator($creator); } // Add a file to the package $package->addFile($filename, $mimetype); // Now deposit the package require("swordappclient.php"); $sac = new SWORDAPPClient(); $dr = $sac->deposit($depositurl, $username, $password, $onbehalfof, $filename, $packageformat, $pacakgecontenttype); I hope this 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 9 373-7599 x81928 http://www.library.auckland.ac.nz/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

