|
From: Lena P. <Len...@we...> - 2005-08-24 14:29:18
|
Hi!
If I try this:
try { =20
String urlString =3D "http://localhost:8080/geoserver/wfs/GetCap=
abilities";
URL u =3D new URL(urlString);
=20
Map map =3D new HashMap();
map.put(WFSDataStoreFactory.URL.key,u); =20
map.put(WFSDataStoreFactory.TIMEOUT.key,new Integer(10000));
map.put(WFSDataStoreFactory.PROTOCOL,Boolean.FALSE);
//map.put(WFSDataStoreFactory.BUFFER=5FSIZE,new Integer(1000));
=20
String fid1 =3D "flurstuecke.288";
String fid2 =3D "flurstuecke.287";
FidFilter fidFilter =3D FilterFactory.createFilterFactory().crea=
teFidFilter();
fidFilter.addFid(fid1);
fidFilter.addFid(fid2);
=20
WFSDataStoreFactory factory =3D new WFSDataStoreFactory();
WFSDataStore store =3D (WFSDataStore)factory.createNewDataStore(=
map);
=20
String[] typeNames =3D store.getTypeNames();
System.out.println(typeNames.toString());
String typeName =3D "landsystem:flurstuecke";
Query query =3D new DefaultQuery(typeName,fidFilter);
//Query query =3D new DefaultQuery(typeName);
FeatureReader reader =3D store.getFeatureReader(query,Transactio=
n.AUTO=5FCOMMIT);
=20
int j =3D 1;
while(reader.hasNext()){
Feature ft =3D reader.next(); =20
System.out.println("Feature "+j+" : "+ft); =20
j++;
}
reader.close();
System.out.println((j-1)+" Features gefunden"); =20
}
I get the following error message:
java.lang.NoClassDefFoundError: org/geotools/data/ows/Service
at org.geotools.xml.wfs.WFSCapabilitiesComplexTypes$ServiceType.getValue(=
WFSCapabilitiesComplexTypes.java:1977)
at org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexElem=
entHandler.java:184)
at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:222)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:139)=
at org.geotools.data.wfs.WFSDataStore.findCapabilities(WFSDataStore.java:=
170)
at org.geotools.data.wfs.WFSDataStore.<init>(WFSDataStore.java:153)
at org.geotools.data.wfs.WFSDataStoreFactory.createNewDataStore(WFSDataSt=
oreFactory.java:170)
at SAXParserTest10.main(SAXParserTest10.java:90)
Is the URL wrong=3F
Lena
Chris Holmes <ch...@op...> schrieb am 24.08.05 16:08:52:
This is actually a question for the geotools-gt2-users list. What seems=20
to be the problem=3F The geotools snippets is the place to go, if it's out=20
of date or missing some information we should fix it there. What is the=20
error that you get=3F What params are you using=3F
On Wed, 24 Aug 2005, Lena Pahl wrote:
>=20
> Hello!
> Can somebody please send an example how to implement a WFSDataStore=3F Tha=
t'd be great!=20
> I tried to get the WFS DataStore snippet from the Geotools page. But th=
ere are some differences between that example and the actual object source=
- it doesn't work.
> Thank you!
> Lena
>=20
>=20
> db...@op... schrieb am 23.08.05 16:06:34:
>=20
> Lena,
>=20
> There is a WFS Datastore in Geotools. It allows easy "talking" with a
> WFS server - including parsing the getcapabilities, making requests,
> and updates/deletes etc... As a *BIG* bonus it parses the GML results
> from a GetFeature request to Geotools Feature Objects (!!).
>=20
> I've never looked at the code, so I dont know how easy it is to use for
> what you are doing.
>=20
> dave
>=20
>=20
>=20
> ----------------------------------------------------------
> This mail sent through IMP: https://webmail.limegroup.com/
>=20
>=20
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practi=
ces
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & =
QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5s=
f
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> Geoserver-users mailing list
> Geo...@li...
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>=20
>=20
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F
> Mit der Gruppen-SMS von WEB.DE FreeMail k=F6nnen Sie eine SMS an alle=20
> Freunde gleichzeitig schicken: http://freemail.web.de/features/=3Fmc=3D02117=
9
>=20
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practi=
ces
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & =
QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5s=
f
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> Geoserver-devel mailing list
> Geo...@li...
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>=20
--=20
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practice=
s
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA=
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Geoserver-users mailing list
Geo...@li...
https://lists.sourceforge.net/lists/listinfo/geoserver-users
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Mit der Gruppen-SMS von WEB.DE FreeMail k=F6nnen Sie eine SMS an alle=20
Freunde gleichzeitig schicken: http://freemail.web.de/features/=3Fmc=3D021179
|