Oleg - Thanks for the quick reply. I think I see my misunderstanding but I still have a problem. The initial URL I'm reading is the feed "collection" :
http://<myserver>:<port>/atomserver/v1/pets/dogs
This is returning the feed response:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:as="http://atomserver.org/namespaces/1.0/">
<as:endIndex>7</as:endIndex>
<link href="/atomserver/v1/pets/dogs?max-results=100" rel="self" />
<author>
<name>AtomServer APP Service</name>
</author>
<title type="text">dogs entries</title>
<updated>2011-06-02T17:41:03.841Z</updated>
<id>tag:atomserver.org,2008:v1:dogs</id>
<entry>
<id>/atomserver/v1/pets/dogs/fido.xml</id>
<title type="text"> Entry: dogs fido</title>
<author>
<name>AtomServer APP Service</name>
</author>
<link href="/atomserver/v1/pets/dogs/fido.xml" rel="self" />
<link href="/atomserver/v1/pets/dogs/fido.xml/1" rel="edit" />
<as:entryId>fido</as:entryId>
<as:updateIndex>5</as:updateIndex>
<as:revision>0</as:revision>
<updated>2011-06-02T17:41:03.837Z</updated>
<published>2011-06-02T17:41:03.837Z</published>
<category scheme="urn:pets.breeds" term="Mixed" />
<link href="/atomserver/v1/pets/dogs/fido.xml" rel="alternate" />
</entry>
<entry>
<id>/atomserver/v1/pets/dogs/sparky.xml</id>
<title type="text"> Entry: dogs sparky</title>
<author>
<name>AtomServer APP Service</name>
</author>
<link href="/atomserver/v1/pets/dogs/sparky.xml" rel="self" />
<link href="/atomserver/v1/pets/dogs/sparky.xml/1" rel="edit" />
<as:entryId>sparky</as:entryId>
<as:updateIndex>6</as:updateIndex>
<as:revision>0</as:revision>
<updated>2011-06-02T17:41:03.839Z</updated>
<published>2011-06-02T17:41:03.839Z</published>
<category scheme="urn:pets.breeds" term="Collie" />
<link href="/atomserver/v1/pets/dogs/sparky.xml" rel="alternate" />
</entry>
<entry>
<id>/atomserver/v1/pets/dogs/spike.xml</id>
<title type="text"> Entry: dogs spike</title>
<author>
<name>AtomServer APP Service</name>
</author>
<link href="/atomserver/v1/pets/dogs/spike.xml" rel="self" />
<link href="/atomserver/v1/pets/dogs/spike.xml/1" rel="edit" />
<as:entryId>spike</as:entryId>
<as:updateIndex>7</as:updateIndex>
<as:revision>0</as:revision>
<updated>2011-06-02T17:41:03.841Z</updated>
<published>2011-06-02T17:41:03.841Z</published>
<category scheme="urn:pets.breeds" term="Mixed" />
<link href="/atomserver/v1/pets/dogs/spike.xml" rel="alternate" />
</entry>
</feed>
These are the entries that I was parsing which obviously don't contain any content elements. The problem now is when I read a particular entry:
http://<myserver>:<port>/atomserver/v1/pets/dogs/fido.xml
using the code below:
Code:
public static void main(String[] args) {
ApplicationContext ac =
new ClassPathXmlApplicationContext(configFiles);
PollableChannel feedChannel = ac.getBean("feedChannel", PollableChannel.class);
for (int i = 0; i < 10; i++) {
Message<SyndEntry> message = (Message<SyndEntry>) feedChannel.receive(1000);
if (message != null){
SyndEntry entry = message.getPayload();
System.out.println(entry.getPublishedDate() + " - " + entry.getTitle());
System.out.println(entry.toString());
}
else {
break;
}
}
}
the message is null and nothing is read. The entry in my initial post is what is returned for the fido.xml document. Is the adapter just to get a listing of the entries and not to actually parse the individual entry? Maybe I don't understand what the feed adapter is intended for.