Anyone out there? :) I'd like to get the Java example working but I haven't spent any more time on it yet. Has anyone implemented SWORD v2 in a server-side Java app?
Phil p.s. The Python example at https://github.com/swordapp/Simple-Sword-Server seems to work fine... I verified it in a Vagrant environment I just created: https://github.com/dvn/swordpoc p.p.s. For some more background... we are hoping to comply with SWORD v2 in the data deposit API we're working on for our Java EE application (Dataverse Network): https://redmine.hmdc.harvard.edu/issues/3108 On Fri, Jun 14, 2013 at 4:32 PM, Philip Durbin <philip_dur...@harvard.edu> wrote: > As a sanity check... I should be able to deploy JavaServer2.0 and have > have JavaClient2.0 talk to it, right? > > Phil > > p.s. These: > > - https://github.com/swordapp/JavaServer2.0 > - https://github.com/swordapp/JavaClient2.0 > > p.p.s. More info on what I'm trying (what is BagIt.zip?): > > murphy:JavaClient2.0 pdurbin$ git diff src > diff --git a/src/main/java/org/swordapp/client/SwordCli.java > b/src/main/java/org/swordapp/client/SwordCli.java > index 8358c10..be47a87 100644 > --- a/src/main/java/org/swordapp/client/SwordCli.java > +++ b/src/main/java/org/swordapp/client/SwordCli.java > @@ -19,9 +19,9 @@ public class SwordCli > private String exampleZip = > "/Users/richard/Code/External/SSS/example.zip"; > private String image = > "/Users/richard/Code/Internal/DepositMO/Dome_sm.jpg"; > private String docx = "/Users/richard/Code/Internal/DepositMO/hy.docx"; > - private String bagit = "/Users/richard/Dropbox/Documents/DUO/BagIt.zip"; > + private String bagit = "/tmp/BagIt.zip"; > //private String sdIRI = "http://localhost:8080/sd-uri"; > - private String sdIRI = "http://localhost:8080/swordv2/servicedocument"; > + private String sdIRI = > "http://localhost:8080/JavaServer2.0/servicedocument"; > private String user = "richard"; > private String pass = "dspace"; > private String obo = null; > murphy:JavaClient2.0 pdurbin$ > murphy:JavaClient2.0 pdurbin$ java -jar target/sword2-client-0.9.2.jar > tryFSDeposit > INFO [main] (SWORDClient.java:1561) - Requesting Service Document > from http://localhost:8080/JavaServer2.0/servicedocument with username > richard > WARN [main] (SWORDClient.java:154) - Unable to retrieve service > document from http://localhost:8080/JavaServer2.0/servicedocument; > responded with 500. Possible problem with SWORD server, or URL > Exception in thread "main" java.lang.NullPointerException > at org.swordapp.client.SwordCli.tryFSDeposit(SwordCli.java:70) > at org.swordapp.client.SwordCli.main(SwordCli.java:56) > murphy:JavaClient2.0 pdurbin$ > murphy:JavaClient2.0 pdurbin$ curl -s > http://localhost:8080/JavaServer2.0/servicedocument | elinks -dump > HTTP Status 500 - > > -------------------------------------------------------------------------- > > type Exception report > > message > > descriptionThe server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > javax.servlet.ServletException: Unable to instantiate class from > 'service-document-impl': > org.swordapp.server.ServiceDocumentManagerImpl > > root cause > > java.lang.ClassNotFoundException: > org.swordapp.server.ServiceDocumentManagerImpl > > note The full stack traces of the exception and its root causes are > available in the GlassFish Server Open Source Edition 3.1.2.2 logs. > > -------------------------------------------------------------------------- > > GlassFish Server Open Source Edition 3.1.2.2 > murphy:JavaClient2.0 pdurbin$ > murphy:JavaClient2.0 pdurbin$ git log --oneline | head -1 > 056f545 add mets deposit tests and associated resources > > p.p.p.s. Nobody is in #swordapp on freenode :( ... should we start it? :) > > -- > Philip Durbin > Software Developer for http://thedata.org > http://www.iq.harvard.edu/people/philip-durbin -- Philip Durbin Software Developer for http://thedata.org http://www.iq.harvard.edu/people/philip-durbin ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ sword-app-tech mailing list sword-app-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sword-app-tech