You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Oliver Mendoza <ol...@base22.com> on 2010/05/08 00:02:50 UTC

Re: AbderaClient.get() question

Hi ck,

Yes, you were right. It was a problem related to a proxy, was blocking the requests to the feed.

Thanks.

On Apr 15, 2010, at 10:17 AM, Oliver Mendoza wrote:

> Hi ck.
> 
> Well, I talked to the Sys Admin and it looks like that's the problem, a blocked port but I haven't tested it because server was under maintaince. I will reply as soon as I can confirm (or refute) that firewall is the problem.
> 
> Thanks, ck.
> 
> 
> On Apr 15, 2010, at 10:04 AM, ck wrote:
> 
>> Hi Oliver,
>> 
>> are you absolutely sure that there are no firewall restrictions
>> between your remote server and the url you try to call?
>> 
>> regards
>> 
>> ck
>> 
>> 
>> ----------------------------------------------------------------------
>> From: Oliver Mendoza <ol...@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>" );
>> }
>> ------------------------------------------------------------------------------------------------------------
>> 
>> Thanks.
>