EPrints Technical Mailing List Archive

Message: #00716


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] {Disarmed} Problem by depositing in EPrints repository with JAVA SWORD Client v2


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=MailScanner has detected a possible fraud attempt from "www.w3.org" claiming to be "http://www.w3.org/2005/Atom" 
xmlns:sword=MailScanner has detected a possible fraud attempt from "purl.org" claiming to be "http://purl.org/net/sword/">
<link rel="self" 
href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/cgi/export/eprint/26/Atom/altar-eprint-26.xml">"http://altar.tu-darmstadt.de/cgi/export/eprint/26/Atom/altar-eprint-26.xml" 
/>
<link rel="edit" href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26" />
<link rel="edit-media" 
href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26/contents">"http://altar.tu-darmstadt.de/id/eprint/26/contents" />
<link rel="contents" 
href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26/contents">"http://altar.tu-darmstadt.de/id/eprint/26/contents" />
<link rel="alternate" href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"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=MailScanner has detected a possible fraud attempt from "eprints.org" claiming to be "http://eprints.org/ep2/data/2.0/eprint/eprint_status" />
<link rel=MailScanner has detected a possible fraud attempt from "purl.org" claiming to be "http://purl.org/net/sword/terms/statement" 
href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26" />
<sword:state 
href="" class="moz-txt-link-rfc2396E" href="http://eprints.org/ep2/data/2.0/eprint/eprint_status/buffer">MailScanner has detected a possible fraud attempt from "eprints.org" claiming to be "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="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"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 at the end it asks agaian the server 
for the entry but it looks for it under false location i.e.
<link rel="edit" href="" class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26" />
and at the end 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 is used completely different implementation for 
parsing the <entry> tags.

I tried to post a message in the SWORD mailings list but till now came no 
answer. Has anyone tried to use the provided from SWORD JAVA Client?
Any suggestions? I hope that someone can give me a hint what can I do to 
get this thing working.

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