Hi, since at least one month I am trying to use the Java SWORD Client (for SWORDv2) in order to deposit files in an EPrints repository. The deposit part works correct and I get the following entry as an answer from server:
<?xml version="1.0" encoding="utf-8" ?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:sword="http://purl.org/net/sword/"> <link rel="self" href="http://altar.tu-darmstadt.de/cgi/export/eprint/26/Atom/altar-eprint-26.xml" /> <link rel="edit" href="http://altar.tu-darmstadt.de/id/eprint/26" /> <link rel="edit-media" href="http://altar.tu-darmstadt.de/id/eprint/26/contents" /> <link rel="contents" href="http://altar.tu-darmstadt.de/id/eprint/26/contents" /> <link rel="alternate" href="http://altar.tu-darmstadt.de/id/eprint/26" /> <published /> <updated>2012-06-06T07:11:51Z</updated> <id>http://altar.tu-darmstadt.de/id/eprint/26</id> <category term="article" label="Article" scheme="http://altar.tu-darmstadt.de/data/eprint/type" /> <category term="buffer" label="Under Review" scheme="http://eprints.org/ep2/data/2.0/eprint/eprint_status" /> <link rel="http://purl.org/net/sword/terms/statement" href="http://altar.tu-darmstadt.de/id/eprint/26" /> <sword:state href="http://eprints.org/ep2/data/2.0/eprint/eprint_status/buffer" /> <sword:stateDescription>This item is in review. It will not appear in the repository until it has been approved by an editor.</sword:stateDescription> <sword:originalDeposit href="http://altar.tu-darmstadt.de/id/eprint/26"> <sword:depositedOn /> <sword:depositedBy>admin</sword:depositedBy> </sword:originalDeposit> <title type="xhtml">On Testing the Atom Protocol...</title> <summary type="xhtml">This is where the abstract of this record would appear. This is only demonstration data.</summary> <author> <name>Y. Lericolais</name> <email /> </author> </entry> The problem is that this entry cannot be parsed internally from the org.apache.abdera classes and I get the following exception: java.lang.ClassCastException: org.apache.abdera.parser.stax.FOMExtensibleElement cannot be cast to org.apache.abdera.model.Entry at org.swordapp.client.SWORDClient.getDepositReceipt(SWORDClient.java:1231) at org.swordapp.client.SWORDClient.getDepositReceipt(SWORDClient.java:1151) at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:375) at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:265) at org.swordapp.ExportToEPrintsViaSWORDv2.main(ExportToEPrintsViaSWORDv2.java:187) I tried with the Java SWORD Client (for SWORDv1) and I got no problems but there as far as I know used completely different implementation for parsing the <entry> tags. Do you have any idea where the problem with v2 can be and what can I do to get this working properly? Thanks in advance, Zaharina -- Dipl.-Math. Zaharina Stoynova Universitäts- und Landesbibliothek Darmstadt Abteilung Elektronische Informationsdienste Schloß, 64283 Darmstadt Tel: +49 6151 16-58773 Fax: +49 6151 16-5897 ------------------------------------------------------------------------------ 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