[georss] java Rome georss plugin failing to consume georss simple - solved
Nathan Heminger
nathan.heminger at gmail.com
Sat Dec 9 12:00:49 EST 2006
Hello Marc,
Thanks so much for the reply. That was one of the first things I checked
when I first encountered the problem. When I got your email though, I went
back and checked yet again. You were right - I checked what jar is being
used in the deployment version, and it turns out that both 0.8.3 and
0.8.5are in the directory. Apparently there was an old copy of the jar
in the
deployment that I somehow missed when updating to 0.8.5. Now it works great
- thanks for the help. I was banging my head on the wall trying to figure
out why it still had that trailing '/'.
Thanks again!
-Nathan
On 12/9/06, Marc <marc at geonames.org> wrote:
>
> Hi Nathan
>
> Which version of the georss module are you using? A trailing slash issue
> should have been removed in version 0.8.5.
>
> Cheers
>
> Marc
>
> Nathan Heminger wrote:
> >
> > Hello,
> >
> > Does anyone know of any problems consuming georss simple feeds? I am
> > having issues with georss simple feeds. Interestingly, I do not have
> > any problems with the the other types.
> >
> > I do the following to get the feed:
> >
> > feed = input.build(
> >
> > *new* XmlReader(*new* URL(url)));
> >
> > and then I try to retrieve the GeoRSSModule on each entry:
> >
> > GeoRSSModule geoRSSModule = GeoRSSUtils./getGeoRSS/(entry);
> >
> > However, the module is returning null. I have tried tracing the
> > problem, and it appears that input.build is not returning the entries
> > with a geomodule for each. It appears only the dcmodule is in the
> > module list for each entry.
> >
> >
> > parseModules() in com.sun.syndication.io.imp.ModuleParsers however
> > seems to find the geomodule fine. Right before a module is added, I
> > output the module:
> >
> > System.
> >
> > /out/.println("adding module: " + module);
> >
> > modules.add(module);
> >
> > and this prints:
> >
> >
> > adding module: SimpleModuleImpl.longitude=-0.331478
> >
> > SimpleModuleImpl.uri=http://www.georss.org/georss/
> >
> > SimpleModuleImpl.interface=interface
> > com.sun.syndication.feed.module.georss.GeoRSSModule
> >
> > SimpleModuleImpl.latitude=51.425972
> >
> > which leads me to believe the module parser is working fine.
> >
> > I have tracked the problem even further, and found that in
> > com.sun.syndication.feed.module.Module.ModuleUtils.getModule(List
> > modules,String uri) I am getting a conflict. This is what the code
> > looks like (debugging system.out.println statement added):
> > *public* *static* Module getModule(List modules,String uri) {
> >
> > Module module =
> >
> > *null*; *for* (*int* i=0;module==*null * && modules!=*null* &&
> > i<modules.size();i++) {
> >
> > module = (Module) modules.get(i);
> >
> > System.
> >
> > /out/.println("doing comparison: module.getUri().equals(uri)) " +
> > module.getUri().equals(uri) + " with uris: " + module.getUri() + " and
> > " + uri); *if* (!module.getUri().equalsIgnoreCase(uri)) {
> >
> > module =
> >
> > *null*;
> >
> > }
> >
> > }
> >
> > *return* module;
> >
> > }
> >
> > This prints out the following:
> >
> > doing comparison: module.getUri().equals(uri)) true with uris:
> > http://purl.org/dc/elements/1.1/ and http://purl.org/dc/elements/1.1/
> > <http://purl.org/dc/elements/1.1/>
> >
> > doing comparison: module.getUri().equals(uri)) false with uris:
> > http://purl.org/dc/elements/1.1/ and http://www.georss.org/georss
> > <http://www.georss.org/georss>
> >
> > doing comparison: module.getUri().equals(uri)) false with uris:
> > http://www.georss.org/georss/ and http://www.georss.org/georss
> >
> > As you can see, one of the urls has an extra "/" at the end.
> >
> > In
> >
> > com.sun.syndication.feed.module.georss.GeoRSSModule, I see the field
> is:
> >
> > public static final String GEORSS_GEORSS_URI =
> > "http://www.georss.org/georss";
> >
> > and in the actual feed I find the uri is:
> >
> > xmlns:georss="*http://www.georss.org/georss* " xmlns:gml="*
> > http://www.opengis.net/gml*">
> >
> > Where is this extra "/" coming from? Which is correct,
> > http://www.georss.org/georss or http://www.georss.org/georss?
> >
> > The specific feed I am currently testing is:
> > http://www.edparsons.com/?feed=rss2
> >
> > and it validates (albiet with warnings) using the W3C Validator:
> >
> http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.edparsons.com%2F%3Ffeed%3Drss2
> > <
> http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.edparsons.com%2F%3Ffeed%3Drss2
> >
> >
> >
> > Is there anything I am missing has anyone else had this problem?
> >
> > Thanks.
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > georss mailing list
> > georss at lists.eogeo.org
> > http://lists.eogeo.org/mailman/listinfo/georss
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.eogeo.org/pipermail/georss/attachments/20061209/8fe3404e/attachment.html
More information about the georss
mailing list