<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">
<pre wrap="">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=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2005/Atom"><font color="red"><b>MailScanner has detected a possible fraud attempt from "www.w3.org" claiming to be</b></font> "http://www.w3.org/2005/Atom"</a>
xmlns:sword=<a class="moz-txt-link-rfc2396E" href="http://purl.org/net/sword/"><font color="red"><b>MailScanner has detected a possible fraud attempt from "purl.org" claiming to be</b></font> "http://purl.org/net/sword/"</a>>
<link rel="self"
href=<a 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"</a>
/>
<link rel="edit" href=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26"</a> />
<link rel="edit-media"
href=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26/contents">"http://altar.tu-darmstadt.de/id/eprint/26/contents"</a> />
<link rel="contents"
href=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26/contents">"http://altar.tu-darmstadt.de/id/eprint/26/contents"</a> />
<link rel="alternate" href=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26"</a> />
<published />
<updated>2012-06-06T07:11:51Z</updated>
<id><a class="moz-txt-link-freetext" href="http://altar.tu-darmstadt.de/id/eprint/26">http://altar.tu-darmstadt.de/id/eprint/26</a></id>
<category term="article" label="Article"
scheme=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/data/eprint/type">"http://altar.tu-darmstadt.de/data/eprint/type"</a> />
<category term="buffer" label="Under Review"
scheme=<a class="moz-txt-link-rfc2396E" href="http://eprints.org/ep2/data/2.0/eprint/eprint_status"><font color="red"><b>MailScanner has detected a possible fraud attempt from "eprints.org" claiming to be</b></font> "http://eprints.org/ep2/data/2.0/eprint/eprint_status"</a> />
<link rel=<a class="moz-txt-link-rfc2396E" href="http://purl.org/net/sword/terms/statement"><font color="red"><b>MailScanner has detected a possible fraud attempt from "purl.org" claiming to be</b></font> "http://purl.org/net/sword/terms/statement"</a>
href=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26"</a> />
<sword:state
href=<a class="moz-txt-link-rfc2396E" href="http://eprints.org/ep2/data/2.0/eprint/eprint_status/buffer"><font color="red"><b>MailScanner has detected a possible fraud attempt from "eprints.org" claiming to be</b></font> "http://eprints.org/ep2/data/2.0/eprint/eprint_status/buffer"</a> />
<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=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26"</a>>
<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=<a class="moz-txt-link-rfc2396E" href="http://altar.tu-darmstadt.de/id/eprint/26">"http://altar.tu-darmstadt.de/id/eprint/26"</a> />
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
<div class="moz-txt-sig">--
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. <a class="moz-txt-link-freetext" href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a>
_______________________________________________
sword-app-tech mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sword-app-tech@lists.sourceforge.net">sword-app-tech@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/sword-app-tech">https://lists.sourceforge.net/lists/listinfo/sword-app-tech</a>
</div></pre>
</div>
</body>
</html>