Hi,

we are trying to setting authentification in WFSDataStore, using several
versions of Geotools (stable 2.7.4 and 8.0).

map.put(WFSDataStoreFactory.URL.key, wfsUrl);
> map.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(10000));
> map.put(WFSDataStoreFactory.ENCODING.key, ENCODING);
> map.put(WFSDataStoreFactory.ENCODING.CRS, wfsLayerSource.getSrs());
> map.put(WFSDataStoreFactory.USERNAME, "XXX");
> map.put(WFSDataStoreFactory.PASSWORD, "XXX");
> map.put("WFSDataStoreFactory:WFS_STRATEGY", "geoserver");
> factory = new WFSDataStoreFactory();
> try {
> }
> catch (IOException exc) {}
>
> dataStore = (WFSDataStore) DataStoreFinder.getDataStore(map);
>
> fs = dataStore.getFeatureSource(wfsLayerSource.getWfsLayerName());
>
>

but always returns this warning:

19-ene-2012 11:42:59 org.geotools.data.DataAccessFinder getDataStore
> WARNING: Web Feature Server should be used, but could not connect
> java.io.IOException: Server returned HTTP response code: 401 for URL


Do we need to set any other parameter? What's about "Geoserver Real"
authentication mode?

Does it work for any geotools version?


Thanks!
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to