XMLStreamException с использованием Abdera

Я пытаюсь получить список записей этого файла XML, используя Apache Abdera

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:td="urn:ibm.com/td" xmlns="http://www.w3.org/2005/Atom">
<generator version="6.0.0.0" uri="http://www.ibm.com/xmlns/prod/sn">IBM Connections - Files</generator>
<id>urn:lsid:ibm.com:td:65f36df0-c51d-4ba1-bcd3-29fac8c96333</id>
<title type="text">Testing photos</title>
<td:uuid>65f36df0-c51d-4ba1-bcd3-29fac8c96333</td:uuid>
<td:type>community</td:type>
<entry>
    <id>urn:lsid:ibm.com:td:25f6369a-e557-4922-a491-4b9e5106bd95</id>
    <td:uuid>25f6369a-e557-4922-a491-4b9e5106bd95</td:uuid>
    <td:label>Folder 4630</td:label>
    <category term="collection" scheme="tag:ibm.com,2006:td/type" label="collection"></category>
    <author>
        <name>Chumel Torres</name>
        <snx:userid>1000181677</snx:userid>
    </author>
    <title type="text">Folder 4603</title>
    <published>2017-09-20T21:36:35.125Z</published>
    <updated>2017-09-20T21:36:53.697Z</updated>
    <td:created>2017-09-20T21:36:35.125Z</td:created>
    <td:modified>2017-09-20T21:36:53.697Z</td:modified>
    <summary type="text"></summary>
</entry>
</feed>

Этот XML получен из вызова API IBM Connections 5.5.

Когда я пытаюсь получить список записей с этим кодом Java

ClientResponse resp = client.get(fullURL);
Feed feed = (Feed)resp.getDocument().getRoot();
List<Entry> entries = feed.getEntries();

Я получаю следующее исключение:

org.apache.abdera.parser.ParseException: javax.xml.stream.XMLStreamException: The root element is required in a well-formed document.

Вторая строка кода Java - это та, которая выдает Exception, функцию.getDocument().

Пожалуйста помоги!

0 ответов

Другие вопросы по тегам