Hi Jody,

I manage to trace the problems back to the parameters I was setting for the
WFS service. Maybe it was a timeout problem?! Although I didn't receive any
notice (exception or log)

My parameters were:

wfsSettings.put(WFSDataStoreFactory.URL.key, wfsURL);
wfsSettings.put(WFSDataStoreFactory.TIMEOUT.key, 10000);
wfsSettings.put(WFSDataStoreFactory.PROTOCOL.key, false);
wfsSettings.put(WFSDataStoreFactory.TRY_GZIP.key, true);
wfsSettings.put(WFSDataStoreFactory.BUFFER_SIZE.key, 500);

Now I use serviceFactory.createParams(wfsURI) and everything works. Do you
have any suspects about the problem?

Cheers
Tiago


-----Original Message-----
From: Jody Garnett [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 25 de Junho de 2007 9:16
To: Tiago Simões
Cc: [email protected]
Subject: Re: [Geotools-gt2-users] Problem accessing WFS

What you are doing sounds right. It could be you are taxing the WFS 
server beyond what it can cope with :-(  Are you getting any kind of 
exception back (or printed, or turn on logging and look for one).

When you say "empty" and "contains the features" are you talking for the 
same content type? Ie one request fails, and then you try it again and 
it fails? Or do certaint feature types fail all the time?

Usually we just have problems with a couple of feature types because the 
xml schema was set up incorrectly. If you get a chance open up a jirra 
issue a link to the service giving you problems.  Right now no paid 
developer is working on WFS (I have been picking up some patches in my 
spare time ... so if you are on a deadline please hire me :-) )

Cheers,
Jody
>
> Hi all,
>
>  
>
> I am trying to consume information from a WFS. I used geotools 
> catalogue API to connect to the server. I then retrieve all available 
> georesources and adapt them to a FeatureSource in order to handle both 
> Shapefiles and WFS in the same way.
>
>  
>
> However I am having a strange problem. When I retrieve the feature 
> collection from the FeatureSource originated from a WFS georesource it 
> is empty, other times it contains the features.
>
>  
>
> What is the problem? Is it wrong to adapt a WFS georesource to a 
> FeatureSource and handle it just as any other FeatureSource, i.e. 
> originated from a shapefile?
>
>  
>
> Thanks
>
> Tiago
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to