Details
Description
I tried consuming the Atom feed available at http://www.snellspace.com/wp/wp-atom1.php in a Java application as below:
RestClient client = new RestClient();
//String url = "http://alexharden.org/blog/atom.xml"; //this feed can be read
String url = "http://www.snellspace.com/wp/wp-atom1.php"; //this feed cannot be read!
//but http://feedvalidator.org/ says it is a valid Atom 1.0 feed
Resource resource = client.resource(url);
AtomFeed feed = resource.accept(MediaType.APPLICATION_ATOM_XML).get(AtomFeed.class);
It however fails with the below error:
Exception in thread "main" java.lang.RuntimeException: Illegal atom content: must contain a single child element
at org.apache.wink.common.model.atom.AtomJAXBUtils$AtomUnmarshallingListener$SpecialContentHandler.getResult(AtomJAXBUtils.java:714)
at org.apache.wink.common.model.atom.AtomJAXBUtils$AtomUnmarshallingListener$AtomUnmarshallerHandler.endSpecialContent(AtomJAXBUtils.java:527)
at org.apache.wink.common.model.atom.AtomJAXBUtils$AtomUnmarshallingListener.afterUnmarshal(AtomJAXBUtils.java:469)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.fireAfterUnmarshal(Loader.java:221)
at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.leaveElement(StructureLoader.java:267)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.endElement(UnmarshallingContext.java:474)
at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.endElement(InterningXmlVisitor.java:77)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.endElement(SAXConnector.java:145)
at org.apache.wink.common.model.atom.AtomJAXBUtils$AtomUnmarshallingListener$AtomUnmarshallerHandler.endElement(AtomJAXBUtils.java:549)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.wink.common.model.atom.AtomJAXBUtils.saxParse(AtomJAXBUtils.java:127)
at org.apache.wink.common.model.atom.AtomJAXBUtils.unmarshal(AtomJAXBUtils.java:149)
at org.apache.wink.common.internal.providers.entity.atom.AbstractAtomFeedProvider.readFeed(AbstractAtomFeedProvider.java:94)
at org.apache.wink.common.internal.providers.entity.atom.AtomFeedProvider.readFrom(AtomFeedProvider.java:59)
at org.apache.wink.common.internal.providers.entity.atom.AtomFeedProvider.readFrom(AtomFeedProvider.java:43)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.readEntity(ClientResponseImpl.java:116)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:60)
at org.apache.wink.client.internal.handlers.ClientResponseImpl.getEntity(ClientResponseImpl.java:47)
at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:178)
at org.apache.wink.client.internal.ResourceImpl.get(ResourceImpl.java:267)
at myPackage.ConsumeAtomUsingWink.main(ConsumeAtomUsingWink.java:19)