abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ck <ch.ko...@googlemail.com>
Subject re: AbderaClient.get() question
Date Thu, 15 Apr 2010 15:04:37 GMT
Hi Oliver,

are you absolutely sure that there are no firewall restrictions
between your remote server and the url you try to call?



From: Oliver Mendoza <oliver.mendoza@burlesontech.com>
To: user@abdera.apache.org
Date: Tue, 13 Apr 2010 11:02:40 -0500
Subject: AbderaClient.get() question
Hi all,

I've been using Abdera to get some RSS Feeds and converting them to
JSON format. I can do all this locally in a JSP using Eclipse+Tomcat
but my problem is when I move this JSP to a remote server, it doesn't
work and returns an exception:

"java.net.SocketException: Connection timed out:could be due to
invalid address."

I pass the RSS URL as a parameter in the URL of my JSP page and what I
understand of the exception is that client.get( urlParameter ) cannot
reach the host of the RSS URL, which make me ask if there is anything
in the AbderaClient.get() method that modifies or replaces some
characters in the URL or if it encodes the URL before making the
request? Maybe based on Character Set of the server?

I say that this same JSP works locally but not in a remote server so
would you say it's a server (on which I'm testing) related problem
only and nothing specific about AbderaClient.get() method?

This is my code:
String urlParameter = request.getParameter("url").toString();
Abdera abderaObj = new Abdera();
AbderaClient client = new AbderaClient(abderaObj);

ClientResponse resp = client.get( urlParameter );

if (resp.getType() == ResponseType.SUCCESS) {
       Document<Feed> doc = resp.getDocument();
       Writer json = abderaObj.getWriterFactory().getWriter("json");
       doc.writeTo(json, out);
} else {
       out.print( "<h1>There was an error parsing the RSS
feed:</h1><h3> " + resp.getStatusText() + "</h3>" );


View raw message